Skip to content

Instantly share code, notes, and snippets.

@mfsiat
Created April 24, 2021 10:41
Show Gist options
  • Save mfsiat/ea19a12fc9a0ee3505343ebbf65358d7 to your computer and use it in GitHub Desktop.
Save mfsiat/ea19a12fc9a0ee3505343ebbf65358d7 to your computer and use it in GitHub Desktop.
{
"query": {
"bool": {
"must": [
{
"regexp": {
"business_name.keyword": "jo[a-zA-Z ]*hukum"
}
}
],
"filter": [
{
"term": {
"categories": "5baca5cd41533c08759778f0"
}
}
]
}
},
"suggest": {
"namesuggester": {
"text": "jo hukum",
"term": {
"field": "business_name"
}
}
},
"from": 0,
"size": 5,
"sort": [
{
"_geo_distance": {
"geo": {
"lat": 23.750573,
"lon": 90.403867
},
"order": "asc",
"unit": "km"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment