Multi-phrase multi-field match


#1

I want to search any one of multiple phrases across multiple fields. If it is one field, I can do as below:

GET my_index/_search
{
    "query": {
        "bool":{
          "should":[
        {"match_phrase" : {"text" : "cloud computing"}},
        {"match_phrase" : {"text" : "supply chain"}},
        {"match_phrase" : {"text" : "analytics"}},
        {"match_phrase" : {"text" : "big data"}}
        ]
    }
      }}

How can I do it across all the fields in the index?


(system) #2

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