I have two documents with a field country
which can contain repeated values, e.g.
Doc1:
country: [US, US, GB, US]
Doc2:
country: [US, GB]
I need a query that when looking for country:US
will assign a higher score to Doc1
than Doc2
since US
appears multiple times in the country
field of Doc1
, while it will assign the same score to the two documents when looking for country:GB
as it appears the same number of times in both documents. Is this something achievable with Elasticsearch?