Last active
November 19, 2018 08:53
-
-
Save diloabininyeri/6b84c1323692fcb53939bdba35cae9d1 to your computer and use it in GitHub Desktop.
elasticsearch bool,must,mus_not compound query example
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
POST http://localhost:9200/accounts/person/_search | |
Content-Type: application/json | |
{ | |
"query": { | |
"bool": { | |
"must": { | |
"multi_match": { | |
"query": "sevda", | |
"fields": [ | |
"name", | |
"lastname" | |
] | |
} | |
}, | |
"must_not": { | |
"range": { | |
"age": { | |
"gt": 23 | |
} | |
} | |
} | |
} | |
} | |
} | |
### get all users name,lastname sevda and age is not gratherthen 23 from accounts/person |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment