Autocomplete for attachment field

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.

Ok, I've found one more problem here.
Attachments are available for the search directly after getiing into the
system. If I'll try to get "file" field like
http://localhost:9200/demo/attachment/1?fields=file&pretty=true directly
after I'll get base64 encoded string.
BUT after a period of time the same request will return "file" field with
extracted text.
What is going on here?

--
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/58712cd9-8f0f-4cdd-8de8-f73387b89e90%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

After 1s by default, your doc is stored in Lucene with all new fields generated by the mapper.
Before that, when you get the file, it comes from the transaction log where it's stored as you send it.

My 2 cents.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 23 févr. 2014 à 00:22, Jimmy Reeves 6675636b6d65616c696365@gmail.com a écrit :

Ok, I've found one more problem here.
Attachments are available for the search directly after getiing into the system. If I'll try to get "file" field like http://localhost:9200/demo/attachment/1?fields=file&pretty=true directly after I'll get base64 encoded string.
BUT after a period of time the same request will return "file" field with extracted text.
What is going on here?

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/58712cd9-8f0f-4cdd-8de8-f73387b89e90%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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/7FFF42A0-7833-49D2-9AC7-C72101ED7876%40pilato.fr.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks for response. May this cause a problem while proceeding data for
alternative field?
Also the attachment field itself can't be copied, this action could be
performed only for it's inner fields. When I am trying to set this mapping
option it just disappears.
So the initial question about autocomplete is still relevant.

воскресенье, 23 февраля 2014 г., 9:05:55 UTC пользователь David Pilato
написал:

After 1s by default, your doc is stored in Lucene with all new fields
generated by the mapper.
Before that, when you get the file, it comes from the transaction log
where it's stored as you send it.

My 2 cents.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 23 févr. 2014 à 00:22, Jimmy Reeves <6675636b6d6...@gmail.com<javascript:>>
a écrit :

Ok, I've found one more problem here.
Attachments are available for the search directly after getiing into the
system. If I'll try to get "file" field like
http://localhost:9200/demo/attachment/1?fields=file&pretty=true directly
after I'll get base64 encoded string.
BUT after a period of time the same request will return "file" field
with extracted text.
What is going on here?

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/58712cd9-8f0f-4cdd-8de8-f73387b89e90%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
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/f146f1bb-390c-486d-960e-b7a5fc4f2703%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.