Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

搜索后返回数据为空 #16

Closed
ISuuuu opened this issue Mar 19, 2024 · 3 comments
Closed

搜索后返回数据为空 #16

ISuuuu opened this issue Mar 19, 2024 · 3 comments
Labels
feature request New feature or request

Comments

@ISuuuu
Copy link

ISuuuu commented Mar 19, 2024

需求描述

阿里云服务器中 使用docker 配置了 es 和ssgo。 搜索后 返回空数据:

{
    "took": 2,
    "total": 0,
    "data": []
}

IP:
http://IP/api/search?query=hello&pageNo=1&pageSize=10
可能与我的es 创建的索引aliyunpan有关
参数如下:

PUT /aliyunpan
{
  "settings": {
    "index": {
      "number_of_shards": 3,  
      "number_of_replicas": 2
    }
  }
}

image

@ISuuuu ISuuuu added the feature request New feature or request label Mar 19, 2024
@Justin3go
Copy link
Owner

索引名可以通过环境变量ES_INDEX配置

ES里面有数据吗?试试:

curl -XGET 'http://localhost:9200/<你的索引名>/_count'

@ISuuuu
Copy link
Author

ISuuuu commented Mar 19, 2024

{"count":0,"_shards":{"total":3,"successful":3,"skipped":0,"failed":0}}  

es版本:7.6.2

@Justin3go
Copy link
Owner

{"count":0,"_shards":{"total":3,"successful":3,"skipped":0,"failed":0}}  

es版本:7.6.2

那应该是你的ElasticSearch里面本身就没数据

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants