Reindex doesn't work properly after adding a new field to multi-fields


(Zhaoyang Shao) #1

ES version: 6.3

Settings:

{
    "settings": {
        "number_of_shards": 1,
        "analysis": {
            "tokenizer": {
                "edge_ngram_tokenizer": {
                    "type": "edgeNGram",
                    "min_gram": "1",
                    "max_gram": "20",
                    "token_chars": [
                        "letter",
                        "digit"
                    ]
                }
            },
            "analyzer": {
                "nGram_analyzer": {
                    "type": "custom",
                    "tokenizer": "edge_ngram_tokenizer",
                    "filter": [
                        "lowercase",
                        "trim",
                        "asciifolding"
                    ]
                }
            },
            "normalizer": {
                "icu_normalizer": {
                    "type": "custom",
                    "char_filter": [
                        
                    ],
                    "filter": [
                        "icu_normalizer",
                        "trim"
                    ]
                }
            }
        }
    }
}

old index:

{
    "name": {
        "type": "text",
        "fields": {
            "keyword": {
                "type": "keyword",
                "normalizer": "icu_normalizer"
            }
        },
        "analyzer": "standard"
    }
}

new index (add a new field under "name"):

{
    "name": {
        "type": "text",
        "fields": {
            "autocomplete": {
                "type": "text",
                "analyzer": "nGram_analyzer"
            },
            "keyword": {
                "type": "keyword",
                "normalizer": "icu_normalizer"
            }
        },
        "analyzer": "standard"
    }
}

when I reindexed data from old_index to new_index, same query on "name" field itself doesn't return same results, it means the data in new_index are not analyzed correctly


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.