Skip to content

Instantly share code, notes, and snippets.

@sbmaggarwal
Created July 8, 2017 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbmaggarwal/56a54a30a8272ec939e1ed8ca65d47c3 to your computer and use it in GitHub Desktop.
Save sbmaggarwal/56a54a30a8272ec939e1ed8ca65d47c3 to your computer and use it in GitHub Desktop.
IN query for Elasticsearch combined with containing query
{
"query": {
"bool": {
"must": [
{
"query_string": {
"fields": [ "name", "rollno" ],
"query": "*John*"
}
},
{
"query_string": {
"fields": [ "majorSubject" ],
"query": "Chemistry OR Biology OR Mathematics"
}
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment