ELK,萌萌哒

es分词索引创建

Elasticsearch | 作者 qq123 | 发布于2016年04月27日 | | 阅读数:7771

{
    "settings": {
        "index": {
            "number_of_replicas": "0",
            "number_of_shards": "5",
            "refresh_interval": "-1",
            "translog.flush_threshold_ops": "100000"
        }
    },
    "mappings": {
        "etp_t": {
            "properties": {
                "dd": {
                    "type": "multi_field",
                    "fields": {
                        "pn": {
                            "type": "string",
                            "store": "yes",
                            "analyzer": "pinyin_first_letter",
                            "search_analyzer": "pinyin_first_letter"
                        },
                        "pk": {
                            "type": "string",
                            "store": "yes",
                            "analyzer": "pinyin_ngram_analyzer",
                            "search_analyzer": "pinyin_ngram_analyzer"
                        },
                        "cn": {
                            "type": "string",
                            "store": "yes",
                            "analyzer": "ik_max_word",
                            "search_analyzer": "ik_max_word",
                            "term_vector": "with_positions_offsets",
                            "boost": 10
                        },
                        "un": {
                            "type": "string",
                            "index": "not_analyzed"
                        }
                    }
                }
            }
        }
    }
}

[尊重社区原创,转载请保留或注明出处]
本文地址:http://elasticsearch.cn/article/76


0 个评论

要回复文章请先登录注册