I am trying to set up autocompletionhttp://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-completion.html for
the attachement field content and I am stuck.
Here is a mapping for my attachment that seems to work fine.
{
"attachment" : {
"_source" : {"excludes" : [ "file" ]},
"_all" : {"store" : "yes"},
"properties" : {
"file_name" : {"type" : "string", "null_value" : "N/A"},
"file_extension" : {"type" : "string", "null_value" : "N/A"},
"file" : {
"type" : "attachment",
"path": "full",
"fields" : {
"file" : {"type" : "string", "term_vector" :
"with_positions_offsets", "store" : "yes"},
"title" : { "store" : "yes},
"date" : {"store" : "yes"},
"keywords" : {"store" : "yes"},
"content_type" : {"store" : "yes"},
"content_length" : {"store" : "yes"}
}
}
}
}
}
So i tried to get autocompletion with adding
"suggest" : {"type" : "completion", "index_analyzer" : "simple",
"search_analyzer" : "simple"}
field to "attachment" type and modifying inner "file" field like
"file" : {"type" : "string", "term_vector" : "with_positions_offsets",
"store" : "yes", "copy_to" : "suggest"}
and the only thing i've got returned by autocomplete action are file
extensions.
Then i tried multifield for inner "file" field
"file" : {
"type" : "multifield",
"fields" : {
"file" : {"type" : "string", "term_vector" : "with_positions_offsets",
"store" : "yes"},
"suggest" : {"type" : "completion", "index_analyzer" : "simple",
"search_analyzer" : "simple" }
}
}
and i've got the same result for autocomplete action, but extracted text
becames unavailbale while queying "file" field.
What am I doing wrong?
--
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/59df56b3-793c-4139-8dc5-f2367d68aa7b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.