gpt4 book ai didi

elasticsearch - Elasticsearch 6.2.4不提供数据进行查询

转载 作者:行者123 更新时间:2023-12-03 02:18:36 25 4
gpt4 key购买 nike

我们有一个在docker上运行的elasticsearch(docker.elastic.co/elasticsearch/elasticsearch: 6.2.4 ),它不会向我们的任何查询返回数据。在下面粘贴我的查询和响应。

query:
*curl -XGET "http://localhost:9200/full_sessions/_doc/_search"*

Result:
*{"took":0,"timed_out":false,"_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}*
我们有数据,我通过kibana尝试了同样的方法,但是没有运气,但是 我可以在kibana 中看到Discover选项中的数据
Screenshot of Kibana Problem
Screenshot of kibana
Query: 

curl -XGET "http://elasticsearch:9200/_cat/indices"


yellow open xxx_full_sessions xxxxxxxxxxxxxxxxx 5 1 175721 6 245.6mb 245.6mb


Query:

curl -XGET "http://elasticsearch:9200/_cat/health"

{
"cluster_name": "docker-cluster",
"status": "yellow",
"timed_out": false,
"number_of_nodes": 1,
"number_of_data_nodes": 1,
"active_primary_shards": 626,
"active_shards": 626,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 15,
"delayed_unassigned_shards": 0,
"number_of_pending_tasks": 0,
"number_of_in_flight_fetch": 0,
"task_max_waiting_in_queue_millis": 0,
"active_shards_percent_as_number": 97.65990639625585
}
任何人都面临过这个问题。请给我一些见解。

最佳答案

您可能需要从URL中删除_doc,因为映射类型的名称可能不同。
只需运行这个

curl -XGET "http://localhost:9200/full_sessions/_search"

关于elasticsearch - Elasticsearch 6.2.4不提供数据进行查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63035090/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com