Hello guys,
I was trying to play with the suggest feature and get a headache when my
first basic example was working but my complexe one wasn't giving results
at all.
I just figured out that when you have a source field at the higher level of
your mapping/document, the suggest feature doesn't return anything.
Here is my mapping which the suggest feature doesn't work :
{
"source" : {
"properties" : {
"domain" : {
"type" : "completion",
"analyzer" : "autocomplete",
"payloads" : true,
"preserve_separators" : false,
"preserve_position_increments" : false,
"max_input_len" : 50
},
"forum" : {
"type" : "completion",
"analyzer" : "autocomplete",
"payloads" : true,
"preserve_separators" : false,
"preserve_position_increments" : false,
"max_input_len" : 50
},
"source" : {
"properties" : {
"name" : {
"type" : "completion",
"analyzer" : "autocomplete",
"payloads" : true,
"preserve_separators" : false,
"preserve_position_increments" : false,
"max_input_len" : 50
}
}
}
}
}
}
Here is my new working one. I just replaced source by toto.
{
"source" : {
"properties" : {
"domain" : {
"type" : "completion",
"analyzer" : "autocomplete",
"payloads" : true,
"preserve_separators" : false,
"preserve_position_increments" : false,
"max_input_len" : 50
},
"forum" : {
"type" : "completion",
"analyzer" : "autocomplete",
"payloads" : true,
"preserve_separators" : false,
"preserve_position_increments" : false,
"max_input_len" : 50
},
"toto" : {
"properties" : {
"name" : {
"type" : "completion",
"analyzer" : "autocomplete",
"payloads" : true,
"preserve_separators" : false,
"preserve_position_increments" : false,
"max_input_len" : 50
}
}
}
}
}
}
I've just created a new issue here
: https://github.com/elasticsearch/elasticsearch/issues/5182?source=cc
Thanks
--
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/07481175-993f-4395-afd8-1409f742f754%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.