Hi:
I am running into a problem with multi-match queries with filter conditions on ES 2.3.3. Its not returning the results I am expecting.
on ES 2.1.1 I get the results in the order I want but on ES 2.3.3. I do not.
Java - 1.8.0_45
Oracle linux 6.5
The mapping... :
{ "entity": { "properties": { "name": { "type": "string", "fields": { "na": { "index": "not_analyzed", "type": "string" }, "autocomplete": { "analyzer": "autocomplete", "type": "string" } } }, "type": { "index": "not_analyzed", "type": "string" } } } }
My Query does a multi_match against the name field
{ "query": { "bool": { "should": [ { "bool": { "must": { "multi_match": { "query": "texas court of appeals, 1s", "fields": [ "name", "name.na", "name.autocomplete" ], "type": "best_fields" } }, "filter": { "term": { "type": "date" } } } }, { "bool": { "must": { "bool": { "must": { "multi_match": { "query": "texas court of appeals, 1s", "fields": [ "name", "name.na", "name.autocomplete" ], "type": "best_fields" } }, "filter": { "term": { "type": "court" } } } } } } ] } } }
While I get the right document back in ES 2.1.1, on ES 2.3.3 I do not . and the matching document is not in top 10 or 20 documents.
If I remove the name.na field from the multi_match query, the query works like expected. If it is just one specific type (court) in the outermost bool query, the query returns the correct document.
So My question is :
Did the multi_match implementation change between versions 2.1.1 and 2.3.3 to cause this behavior ?
Any assistance is much appreciated.
Thanks
Ramdev