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 <[email protected]>:

> Probably you should use dynamic templates for mappings:
>
> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-root-object-type.html#_dynamic_templates
>
> 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 [email protected].
> 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 [email protected].
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.

Reply via email to