alibaba/havenask-federation

对于Object对象的fieldname,searcher接口查不到数据

Huaixinww opened this issue · 1 comments

例子如下:

"mappings": {
    "properties": {
      "user.11": { 
        "properties": {
          "name": { 
            "type": "text"
          },
          "age": { 
            "type": "integer"
          },
          "image":{
            "type":"vector",
            "dims":"2",
            "similarity":"l2_norm"
          }
        }
      }
    }
  }

PUT /test_index2/_doc/3
{
  "user.11": {
    "name": "Charlie",
    "age": 35,
    "image": [0.3, 0.8]
  }
}

#查询语句
GET /test_index2/_search
{
  "query": {
    "term": {
      "user.11.age": "35"
    }
  }
}

对于这个mapping,使用上述查询语句查不到数据,因为fed内部打平数据时会把'.'替换成'_',使用sql语句查询也可以看到查询出来的fieldname为user_11_age如下:
image

fixed by:#405