I have a document having an array like
doc1
{ "item_type":"bag", "color":["red","blue","green","orange"] }
doc2
{ "item_type":"shirt", "color":["red"] }
when I search on several parameters, for example
{ "query": { "multi_match": { "query": "red bag", "type": "cross_fields", "fields": ["item_type","color"] } } }
Doc2 has a much higher score, I understand that in the color box submitted, fewer objects get a higher score, and this gets worse if I have more colors in doc1.
So, is there a way I can ask Elasticsearch to hammer the same thing for an array field no matter how many elements there are?
source share