Match on different fields

I would like to search on different fields:

here is my search query:

{
"index":"ats",
"type":"candidate",
"body":{
"query":{
"bool":{
"must":{
"term":{
"skill":"python",
"location":"romania"
}
}
}
}
}
}

Any kind of help is much appreciated.

Hi @likeElastic,

You may be interested in a bool query like this:

GET ats/candidate/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "skill": {
              "value": "python"
            }
          }
        },
        {
          "term": {
            "location": {
              "value": "romania"
            }
          }
        }
      ]
    }
  }
} 

Regards,
Luiz Santos

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