Facets are whitespaced tokenized even they are indexed as not analyzed

Hi,
Below you can see my mapping.
My destination_facets field is whitespace tokenized even its indexed as
not_analyzed, Any ideas ?
{
"mappings": {
"hotel": {
'properties': {
"name": {
"type": "string",
"analyzer": "str_index_analyzer"},

                "destination": {'properties': {'en': {
                    "type": "string",
                    "analyzer": "str_index_analyzer"}}},


                "country": {"properties": {"en": {
                    "type": "string",
                    "analyzer": "str_index_analyzer"}}},
                "destination_facets": {"properties": {"en": {
                    "type": "string",
                    "index": "not_analyzed"
                }}}
            }
        }
    },
    "settings": {
        "analysis": {
            "analyzer": {
                "str_index_analyzer": {
                    "tokenizer": "keyword",
                    "filter": ["lowercase", "substring", "whitespace"]
                }
            },
            "filter": {
                "substring": {
                    "type": "edgeNGram",
                    "min_gram": 3,
                    "max_gram": 20,
                }
            }
        }
    }
}

--
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.

I prefer to separate index settings than mappings.

So I often use the PutMapping API.

Did you try it?

If it's not working, can you create a full curl recreation and Gist it?

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 31 mai 2013 à 10:15, TunaVargı tuna40@gmail.com a écrit :

Hi,
Below you can see my mapping.
My destination_facets field is whitespace tokenized even its indexed as not_analyzed, Any ideas ?
{
"mappings": {
"hotel": {
'properties': {
"name": {
"type": "string",
"analyzer": "str_index_analyzer"},

                "destination": {'properties': {'en': {
                    "type": "string",
                    "analyzer": "str_index_analyzer"}}},


                "country": {"properties": {"en": {
                    "type": "string",
                    "analyzer": "str_index_analyzer"}}},
                "destination_facets": {"properties": {"en": {
                    "type": "string",
                    "index": "not_analyzed"
                }}}
            }
        }
    },
    "settings": {
        "analysis": {
            "analyzer": {
                "str_index_analyzer": {
                    "tokenizer": "keyword",
                    "filter": ["lowercase", "substring", "whitespace"]
                }
            },
            "filter": {
                "substring": {
                    "type": "edgeNGram",
                    "min_gram": 3,
                    "max_gram": 20,
                }
            }
        }
    }
}

--
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.

--
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.

How should I set the filter edgeNGram tokenizer while using PutMapping API..

31 Mayıs 2013 Cuma 11:38:57 UTC+3 tarihinde David Pilato yazdı:

I prefer to separate index settings than mappings.

So I often use the PutMapping API.

Did you try it?

If it's not working, can you create a full curl recreation and Gist it?

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 31 mai 2013 à 10:15, TunaVargı <tun...@gmail.com <javascript:>> a
écrit :

Hi,
Below you can see my mapping.
My destination_facets field is whitespace tokenized even its indexed as
not_analyzed, Any ideas ?
{
"mappings": {
"hotel": {
'properties': {
"name": {
"type": "string",
"analyzer": "str_index_analyzer"},

                "destination": {'properties': {'en': {
                    "type": "string",
                    "analyzer": "str_index_analyzer"}}},


                "country": {"properties": {"en": {
                    "type": "string",
                    "analyzer": "str_index_analyzer"}}},
                "destination_facets": {"properties": {"en": {
                    "type": "string",
                    "index": "not_analyzed"
                }}}
            }
        }
    },
    "settings": {
        "analysis": {
            "analyzer": {
                "str_index_analyzer": {
                    "tokenizer": "keyword",
                    "filter": ["lowercase", "substring", "whitespace"]
                }
            },
            "filter": {
                "substring": {
                    "type": "edgeNGram",
                    "min_gram": 3,
                    "max_gram": 20,
                }
            }
        }
    }
}

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

--
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.