Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save diloabininyeri/34b53c81cff5e3e70cf3cc45723c5d07 to your computer and use it in GitHub Desktop.
Save diloabininyeri/34b53c81cff5e3e70cf3cc45723c5d07 to your computer and use it in GitHub Desktop.
elasticsearch bool,must,must_not,sort,sort example
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": 100
}
}
}
}
},
"sort":{
"age":"asc"
},
"from":0,
"size":20
}
###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment