小编r-k*_*r-k的帖子

具有相同类型的弹性搜索父级

很抱歉,如果这是重复(我尝试搜索),或者这是一个愚蠢的问题.发布问题的新手.

我正在尝试使用以下内容在ElasticSearch中进行父子关系和查询:

    #!/bin/bash

curl -XDELETE 'http://localhost:9200/test/'
echo

curl -XPUT 'http://localhost:9200/test/' -d '{
"settings" : {
        "index" : {
            "number_of_shards" : 1
        }
    }
}'
echo

curl -XPUT localhost:9200/test/_mapping/nelement -d '{
        "nelement" : {
            "_id" : { "path" : "nid", "store" : true, "index" : "not_analyzed"},
            "_parent" : { "type" : "nelement"},
            "properties" : {
                "name" : { "type" : "string",  "index" : "not_analyzed" },
                "nid": { "type" : "string", "copy_to" : "_id" }
            }
        }
}'
echo

#curl -s -XPOST …
Run Code Online (Sandbox Code Playgroud)

parent-child elasticsearch

6
推荐指数
1
解决办法
786
查看次数

标签 统计

elasticsearch ×1

parent-child ×1