Indexing same field as both analyzed and not_analyzed to _all

Group -

In our current Lucene based framework, we have a need to index fields to
_all both as analyzed (standard) and not_analysed.
I understand that i can use multi_field to add it to 2 different fields

"type" : "multi_field",
"fields" : {
"name" : {
"type" : "string",
"index" : "analyzed",
"index_analyzer" :"keyword_lowercase"
},
"actual" :
{
"type" : "string",
"store" : "yes",
"index" : "not_analyzed"
}
}

2 Questions.

1. Can I configure _all as a multi_field ?
2. Is it possible to i use the same name twice to index 2 different data

 "type" : "multi_field",
 "fields" : {
    *"name"* : {
 "type" : "string", 
 *"index" : "analyzed",*

},
"name" :
{
"type" : "string",
"store" : "yes",
"index" : "not_analyzed"
}
}
The requirement is to index both analyzed and not_analyzed data to the
_all fields.

-Vidhya

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

  1. You can not turn _all into multi field.

  2. Nevertheless, you can set up a custom analyzer for _all, and with a
    token filter, you can add stemmed (= analyzed) plus unstemmed (= not
    analyzed) words to the _all field with the KeywordRepeaterFilter

Discussion https://groups.google.com/forum/#!topic/elasticsearch/WUF4DZxYCxs

Lucene issue: https://issues.apache.org/jira/browse/LUCENE-4817

ES docs:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-keyword-repeat-tokenfilter.html

Jörg

--
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.
For more options, visit https://groups.google.com/groups/opt_out.