查询结果不包含预期的内部对象

Result of the query does not contain the expected inner object

嗨!

我目前因查询的部分结果而被阻止:我执行了以下查询:

curl -XGET http://localhost:9200/index_new/_search {'query': {'range': {'collectedTime': {'gte': '2017-01-01 00:00:00Z', 'lte': 'now/d'}}}, 'size': 10}

通常应该return以下数据(在 Kibana 上可用):

但我有以下结果示例:

"_source": {
    "collectedTime" : "May 15th 2018, 00:50:33.000",
    "meta_lang" : "en",
    "movies" : [],
    "publish_date" : "May 15th 2018, 02:00:00.000",
    "summary" : "Late last Friday,"
}

似乎名为 sourceInner object 没有被 return 编辑。我可能忘记在我的查询中添加一些东西吗?或者有什么东西要添加到我的映射中?

注意:我的映射中有source Inner Object的摘录:

"source": {
    "properties" : {
        "category" : { "type": "text"},
        "country" : { "type": "text"},
        "lang" : { "type": "text"}
    },

有什么想法吗?

按照这些步骤您将获得您的数据。

  1. 在您的 Kibana 管理面板中刷新索引映射。
    1. 检查 kibana 发现中的过滤器并确保其中有数据。
    2. 从 kibana 复制过滤查询并使用那个。

希望这能帮助您解决问题。