search - Elasticsearch Completion Suggester field contains comma separated values -
i have field contains comma separated values want perform suggestion on.
 {     "description" : "breakfast,sandwich,maker"  }   is possible applicable token while performing suggest type?? ex: when break, how can breakfast , not breakfast,sandwich,maker?
i have tried using commatokenizer seems not help
as said in documentation, can provide multiple possible inputs indexing this:
curl -x put 'localhost:9200/music/song/1?refresh=true' -d '{     "description" : "breakfast,sandwich,maker",         "suggest" : {             "input": [ "breakfast", "sandwitch", "maker" ],             "output": "breakfast,sandwich,maker"     } }'   this way, suggest word of list input.
obtaining corresponding word suggestion elasticsearch not possible workaround use tokenizer outside elasticsearch split suggested string , choose 1 has input prefix.
edit: better solution use array instead of comma-separated values, doesn't meet specs... ( @ this: elasticsearch autocomplete search on array field )
Comments
Post a Comment