Json 如何在elasticsearch中检索所有文档

Json 如何在elasticsearch中检索所有文档,json,Json,我是ES的新手,需要帮助 这是我的JSON数据集 { "simplewiki": { "page": [{ "index": { "_index": "myindex", "_type": "wiki", "_id": "1" } }, {

我是ES的新手,需要帮助

这是我的JSON数据集

{
    "simplewiki": {
        "page": [{
                "index": {
                    "_index": "myindex",
                    "_type": "wiki",
                    "_id": "1"
                }
            },
            {
                "title": "April",
                "url": "https://simple.wikipedia.org/wiki/April",
                "abstract": "April is the 4th month of the year, and comes between March and May. It is one of four months to have 30 days.",
                "sections": ["The Month", "April in poetry", "Events in April", "Fixed Events", "Moveable Events", "Selection of Historical Events", "Trivia", "References"]
            },

            {
                "index": {
                    "_index": "myindex",
                    "_type": "wiki",
                    "_id": "2"
                }
            },
            {
                "title": "August",
                "url": "https://simple.wikipedia.org/wiki/August",
                "abstract": "August (Aug.) is the 8th month of the year in the Gregorian calendar, coming between July and September.",
                "sections": ["The Month", "August observances", "Fixed observances and events", "Moveable and Monthlong events", "Selection of Historical Events", "Trivia", "References"]
            }
        ]
    }
}

问题是我使用了下面的命令来编制索引: curl-XPOST locahost:9200/myindex/wiki--data binary@wiki.json

执行后:(52)来自服务器的空回复,共2个成功1个失败0个。 当我使用以下命令时:curl-XGET localhost:92200/myindex/wiki/1?漂亮吗

我得到以下信息,但不是所有的细节,发现是假的

{
  "_index":"myindex",
  "_type":"wiki",
  "_id":"1",
  "found" :false
}

我如何确保找到的是真实的,并且检索到了整个标题和摘要。非常感谢您的帮助。

您能在发布数据后附上收到的邮件吗?(我现在无法添加评论)


您可以阅读并重试

您能在发布数据后附加收到的邮件吗?(我现在无法添加评论)


您可以阅读并重试

以下是curl命令{“{u index”:“myindex”、“{u type”:“wiki”、“{u id”:“AV811U-X_pQ5CpohrUQD”、“{u version”:“1”、“result”:created”、“{u shared”:{“total:2”,“successful”:1,“failed”:0},“created”:true}当我执行命令时:curl-XGET localhost:92200/myindex/wiki/1?相当漂亮吗?我期待类似于下面的{“myindex”:“myindex”,”_键入“:”wiki“,”找到“:”true“:”来源“{”摘要“:”April is…”,“title:”April“,”url“:::[…]}}}}以下是curl命令“{”索引“:”myindex“,”类型“:”wiki“,”id“:”AV811U-X_pQ5CpohrUQD“,”版本“:”1“,”结果:created“,”_shared“:{”总计:2,“成功”:1,“失败”:0},“created”:true“}当我执行以下命令时:curl-XGET localhost:92200/myindex/wiki/1?pretty?我希望下面的内容类似于{“{u index”:“myindex”,“{u type”:“wiki”,“{u id”:“1”,“found”:“true”{u来源:{“abstract”:“April is…”,“title:“April”,“url”:[…]}}