Created
July 8, 2017 08:44
-
-
Save sbmaggarwal/56a54a30a8272ec939e1ed8ca65d47c3 to your computer and use it in GitHub Desktop.
IN query for Elasticsearch combined with containing query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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