Skip to content

Instantly share code, notes, and snippets.

@schmmd
Created September 28, 2015 15:50
Show Gist options
  • Save schmmd/708875d24d0fa775e231 to your computer and use it in GitHub Desktop.
Save schmmd/708875d24d0fa775e231 to your computer and use it in GitHub Desktop.
suggestions.json
{
"_shards": {
"total": 3,
"successful": 3,
"failed": 0
},
"my-title-suggestions-1": [
{
"text": "open",
"offset": 0,
"length": 4,
"options": []
},
{
"text": "infrmation",
"offset": 5,
"length": 10,
"options": [
{
"text": "information",
"score": 0.9,
"freq": 87638
},
{
"text": "infomation",
"score": 0.9,
"freq": 7
},
{
"text": "infromation",
"score": 0.9,
"freq": 4
}
]
},
{
"text": "extracton",
"offset": 16,
"length": 9,
"options": [
{
"text": "extraction",
"score": 0.8888889,
"freq": 18268
},
{
"text": "extractor",
"score": 0.8888889,
"freq": 248
},
{
"text": "extracion",
"score": 0.8888889,
"freq": 3
}
]
}
]
}
@schmmd
Copy link
Author

schmmd commented Sep 28, 2015

The query here was against http://es.development.s2.allenai.org:9200/_suggest:

{
    "my-title-suggestions-1" : {
      "text" : "open infrmation extracton",
      "term" : {
        "size" : 3,
        "field" : "title"
      }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment