I'm wanting to map all fields in my indices to a String. I understand that
you do this with a mapping but I'm having trouble constructing the correct
structure. If I don't, there will be collisions with a field "Code" being
either an integer or string with my given input.
--
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/70e36b0c-3330-42f2-8e67-7f61e2748fc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello Grayson ,
You can use _default
http://www.elastic.co/guide/en/elasticsearch/reference/1.x/index-modules-mapper.html#_default_mapping
_
http://www.elastic.co/guide/en/elasticsearch/reference/1.x/index-modules-mapper.html#_default_mapping
to mark all types under a type.
Then you can use dynamic field template
http://www.elastic.co/guide/en/elasticsearch/guide/master/custom-dynamic-mapping.html#dynamic-templates
to impose this rule.
In your case you can use match_mapping_type to identify all numbers and
impose string mapping.
Or even apply to * pattern should also work , with the top being more
accurate.
Thanks
Vineeth Mohan,
Elasticsearch consultant,
qbox.io ( Elasticsearch service provider http://qbox.io/)
On Sat, Apr 4, 2015 at 4:09 AM, Grayson Cash cashgl92@gmail.com wrote:
I'm wanting to map all fields in my indices to a String. I understand that
you do this with a mapping but I'm having trouble constructing the correct
structure. If I don't, there will be collisions with a field "Code" being
either an integer or string with my given input.
--
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/70e36b0c-3330-42f2-8e67-7f61e2748fc1%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/70e36b0c-3330-42f2-8e67-7f61e2748fc1%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.
--
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/CAGdPd5nSCjQG8g51m%3DgXkBb71t4Y2Yw_we19D%2BTp904eawZfOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.