Yes, the correct way would be to index intentLocationDescription as a 
multi-field. You don't have to introduce it as multiple fields in your 
source document. All you need to do is on the ES mapping, you set that 
field to a multi-field, once as whatever analyzed you want, and the other 
as not_analyzed. You can see an example here:

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-core-types.html#_multi_fields_3

Wherein you have 2 fields in the index derived from 1 single field in your 
JSON source. The "name" field is analyzed. And then the "name.raw" field is 
not_analyzed which is what you want to aggregate on.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/3b0b8f26-0775-4d6c-9376-faab0e03b106%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to