Elasticsearch query strategy for nested array elements
First, you should move channel data to separate fields (or to
object
field at least)If you need simple matching algo (±deviation without scoring), then you can perform simple
filter>range
queries, passing your fuzziness threshold in query.If you need scoring (how much similar that docs are), than you need to perform scripted queries. Take a look at this article
Btw, I strongly recommend work in HSL space, if you need such operations, you'll get much better results. Take a look at this example