alibaba / havenask-federation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

qrs的target增加shard的分片信息后,创建索引、写入数据后使用search接口查询有可能会查不到

Huaixinww opened this issue · comments

示例如下:

#创建索引
PUT test_index
{
  "settings": {
    "index.engine": "havenask",
    "number_of_shards": 6, 
    "number_of_replicas": 2
  },
  "mappings": {
    "properties": {
      "foo": {
        "type": "keyword"
      }
    }
  }
}
#写入数据
POST test_index/_doc
{
  "foo-test":"124"
}
#search接口查询
GET test_index/_search
#sql语句查询
GET /_havenask/sql?query=select%20*%20from%20`test_index`

使用search接口查询不到数据,使用sql语句查询报错如下:
init gig stream failed, biz: general.test_index.write
image