Hello,
I am using completion suggester for user search on my website. I basically
followed the howto from elasticsearch webpage.
Created the mapping:
post /gruppu/user/_mapping
{
"user" : {
"properties" : {
"name" : { "type" : "string" },
"suggest" : { "type" : "completion",
"index_analyzer" : "simple",
"search_analyzer" : "simple",
"payloads" : true
}
}
}
}
And I put something to the ES:
post /gruppu/user/100000001?refresh=true
{
"name" : "jorge",
"suggest" : {
"input": [ "jjorge"],
"payload" : { "userid" : 100000001, "grouporuser": "group" }
}
}'
*The problem is that when I delete or update above document, the suggester
still seems to cache the data. My question is what is the correct way to
update the documents in ES to have the suggester working correctly? *
For example the above document, after updating the document and changing
the "input" , when I search for it I get the latest version:
{"_index":"gruppu","_type":"user","_id":"100000001","_version":4,"exists":true,
"_source" : {
"name" : "jorge",
"suggest" : {
"input": [ "jorge group"],
"payload" : { "userid" : 100000001, "grouporuser": "group" }
}
}'
}
When I run the suggester I get following:
"user-suggest": [
{
"text": "j",
"offset": 0,
"length": 1,
"options": [
{
"text": "jorge group",
"score": 2,
"payload": {
"userid": 100000001,
"grouporuser": "group"
}
},
{
"text": "jjorge",
"score": 1,
"payload": {
"userid": 100000001,
"grouporuser": "group"
}
},
So what is the correct way of updating the ES documents when using the
suggester ?
Thanks,
Jorge Sanchez
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d968850f-a973-4e78-ab75-8d2558545066%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.