How does multi matching with _all work?


Hi everyone, I wanted to know how multi matching with _all work. Let 's say I have the following query:

"multi_match": {
                                    "query": x,
                                     "type": "phrase",

Does it search all available fields for the particular phrase and returns a record if the phrase exists in all fields? What if some of the fields have it and some other do not?

(David Pilato) #2

_all field has been removed in 6.0.

What it was doing before was just collecting all values from other fields and indexing it in a flat way.

Not ideal IMO.

Better to use something like:

  "query": {
    "multi_match" : {
      "query":   x, 
      "fields": [ "field1", "field2" ] 

Where you need to have the phrase in one of the fields at least.

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.