How to forbid the analyzing for a certain data type (e.g. string)

Hi all:

we gathering data(in json format) from user input. I want to know is there
any way to forbid the analyzing process for certain data type(e.g. string),
so that if we detect the value of some field is in string format, we will
not analyze it.

thanks

--
不学习,不知道

--
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/CA%2BJstLBM_%3D6EEChk9vB0K1gtJpBAiXgTcFn7PC5bHsTDBTG%2Brw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Probably you should use dynamic templates for mappings:

05 август 2014, вторник, 14:08:29 UTC+3, 潘飞 написа:

Hi all:

we gathering data(in json format) from user input. I want to know is there
any way to forbid the analyzing process for certain data type(e.g. string),
so that if we detect the value of some field is in string format, we will
not analyze it.

thanks

--
不学习,不知道

--
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/f7b3f7b2-e9e4-42e6-812e-0edd33c7478f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Thanks very much, I resolve it using :

curl -XPUT "http://localhost:9200/_template/not_analyzed_template" -d'
{
"template": "test*",
"mappings": {
"default": {
"dynamic_templates": [
{
"template_1": {
"mapping": {
"index": "not_analyzed",
"type": "string"
},
"match_mapping_type": "string",
"match": "*"
}
}
],
_all: {
"enabled": false
}
}
}
}

2014-08-05 20:10 GMT+08:00 Tihomir Lichev shoteff@gmail.com:

Probably you should use dynamic templates for mappings:

Elasticsearch Platform — Find real-time answers at scale | Elastic

05 август 2014, вторник, 14:08:29 UTC+3, 潘飞 написа:

Hi all:

we gathering data(in json format) from user input. I want to know is
there any way to forbid the analyzing process for certain data type(e.g.
string), so that if we detect the value of some field is in string format,
we will not analyze it.

thanks

--
不学习,不知道

--
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/f7b3f7b2-e9e4-42e6-812e-0edd33c7478f%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/f7b3f7b2-e9e4-42e6-812e-0edd33c7478f%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/CA%2BJstLAUVCmp8iv2HwO7zWMo1TzoBHHEvNqdzRQPL9zhX8%2BwXQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.