autocomplete - Elasticsearch Completion in middle of the sentence -


is possible perform completion on elasticsearch , result if text middle of input?

for instance:

"titlesuggest" : {   "type" : "completion",   "index_analyzer" : "simple",   "search_analyzer" : "simple",   "payloads" : true,   "preserve_position_increments" : false,   "preserve_separators" : false } 

that's current mapping , query is

{   "passport": {     "text": "industry overview",     "completion": {       "field": "titlesuggest",       "fuzzy": {         "edit_distance": 2       }     }   } } 

but nothing returned, have documents contain industry overview in input. instance if i'm looking industry:

{   "text" : "industry",   "offset" : 0,   "length" : 8,   "options" : [{       "text" : "airline industry sees recovery in 2014",       "score" : 16     }, {       "text" : "alcoholic drinks industry overview",       "score" : 16     }, {       "text" : "challenges in pet care industry 2014",       "score" : 16     }   ] } 

i can achieve using ngrams, i'd done using completion suggesters

so initial goal getting if type in industry overview

{   "text" : "industry overview",   "offset" : 0,   "length" : 8,   "options" : [{       "text" : "alcoholic drinks industry overview",       "score" : 16     }   ] } 

i've tried using shingle analyzer - didn't solve problem , didn't come on google useful.

es version : 1.5.1


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -