Does word order matter in my query?

I am trying to put together a query. field1 is a big text field. I am looking for key words in there. order of keywords do not matter. I would like to know if the query below achieves that. Thank you !

query_template = {
      "query" : {
       "bool": {
       "should" : 
                [
        {"match": {"field1": {"query": "i do not care about the order of keywords here", "boost": 10}}},
                ]
              }         
      }
    }

If you go with the defaults, and field1 is a text field with the standard analyzer, then order does indeed not matter. However, if you have applied a custom mapping (for example, if the field is mapped as type keyword or if it has an analyzer with shingles) then order may matter.

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