Match all terms spread across specified fields


(Brian Keith) #1

Is there a query to match a whole phrase across multiple specified fields?
So a phrase like "the brown fox" would match a row with fields like:
field1: 'the'
field2: 'brown'
feild3: 'fox'
field4: 'random'

field4 would not be included in the query, and the query "the brown fox ran" would not match.

Thanks for any help.


(Jason Wee) #2

query string would probably work for your use case https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_multi_field_2

jason


(system) #3