Skip to content

Instantly share code, notes, and snippets.

@sha1sum
Last active August 11, 2016 18:46
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 sha1sum/036b5eda5b806ef9688a72f020847735 to your computer and use it in GitHub Desktop.
Save sha1sum/036b5eda5b806ef9688a72f020847735 to your computer and use it in GitHub Desktop.
{
"query": {
"match": {
"values.shortDescription": "automadic generater"
}
},
"filter": {
"bool": {
"must": [
{
"term": {"organizationID": "924875694892449652"}
}
]
}
},
"suggest": {
"text": "automadic generater",
"simple_phrase": {
"phrase": {
"field": "values.shortDescription",
"size": 5,
"gram_size": 2,
"direct_generator": [
{
"field": "values.shortDescription",
"size": 5,
"min_doc_freq": 2
}
]
}
}
}
}
{
"took": 24,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
},
"suggest": {
"simple_phrase": [
{
"text": "automadic generater",
"offset": 0,
"length": 19,
"options": [
{
"text": "automatic generater",
"score": 0.00025325117
},
{
"text": "automadic generator",
"score": 0.00024664536
},
{
"text": "automadic generators",
"score": 0.00013755567
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment