yes i saw that. But I don't need the documents, I only need the suggestions for autocomplete purposes. Just like the suggest-completion worked in version before 5
I will give you the responses with the same dataset in ES 1.7 en ES5:
I get this when I want to give suggestions for 'me' in ES5
{
"_source": "suggest",
"suggest": {
"merk-suggest" : {
"prefix" : "me",
"completion" : {
"field" : "merk_suggest",
"size": 5
}
}
}
}
and get this result in ES5
{
"took": 6,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 0,
"max_score": 0.0,
"hits": []
},
"suggest": {
"merk-suggest": [
{
"text": "me",
"offset": 0,
"length": 2,
"options": [
{
"text": "mega",
"_index": "rdw",
"_type": "kenteken",
"_id": "jggp39",
"_score": 1.0,
"_source": {}
},
{
"text": "mega",
"_index": "rdw",
"_type": "kenteken",
"_id": "f464df",
"_score": 1.0,
"_source": {}
},
{
"text": "mega",
"_index": "rdw",
"_type": "kenteken",
"_id": "77dpp3",
"_score": 1.0,
"_source": {}
},
{
"text": "meierling",
"_index": "rdw",
"_type": "kenteken",
"_id": "on46zt",
"_score": 1.0,
"_source": {}
},
{
"text": "meierling",
"_index": "rdw",
"_type": "kenteken",
"_id": "op32lt",
"_score": 1.0,
"_source": {}
}
]
}
]
}
}
With ES 1.7:
{
"song-suggest" : {
"text" : "me",
"completion" : {
"field" : "merk_suggest",
"size": 5
}
}
}
results in ES 1.7
{
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"song-suggest": [
{
"text": "me",
"offset": 0,
"length": 2,
"options": [
{
"text": "mercedes-benz",
"score": 82106.0,
"payload": {
"url": "mercedes-benz"
}
},
{
"text": "mercury",
"score": 143.0,
"payload": {
"url": "mercury"
}
},
{
"text": "mercedes-amg",
"score": 124.0,
"payload": {
"url": "mercedes-amg"
}
},
{
"text": "mega",
"score": 118.0,
"payload": {
"url": "mega"
}
},
{
"text": "meto",
"score": 87.0,
"payload": {
"url": "meto"
}
}
]
}
]
}
The results is already grouped by name. I don't need the actual document, I just want the suggestion, and a payload would be awesome, but that's also dropped in ES5