River Plugin Not_analyzed option for Elasticsearch



我正在使用Elasticsearch 1.1.1,River Plugin和MongoDB 2.4

我有一个名为 cidr 的字段正在分析中。我需要对其进行设置,以便not_analyzed将其正确用于 Kibana。以下是我使用的索引。但是现在我将再次重新索引它(删除并编写一个新的。

不分析"cidr"字段中的值的方式编写新索引的正确方法是什么?谢谢。

curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{
    "type": "mongodb", 
    "mongodb": { 
        "db": "collective_name",
        "collection": "ips"
    }, 
    "index": { 
        "name": "mongoindex"
    }
}'

我明白了。它现在正在工作。应在创建索引之前创建映射。

curl -XPUT "localhost:9200/mongoindex" -d '
{
    "mappings": {
       "mongodb" : {
        "properties": {
            "cidr": {"type":"string", "index" : "not_analyzed"}
        }
      }
    }
}'

就是这样,:)

最新更新