我已经阅读了查询字符串文档但没有找到任何对嵌套字段的引用:http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html
我可以使用JSON格式的嵌套查询/过滤器,但是真的想使用查询字符串,因为它们更便于进行临时搜索.我感兴趣的字段在映射中被声明为"嵌套",例如
"tags": {
"type": "nested",
"properties": {
"name": {
"type": "string",
"index": "not_analyzed"
},
"value": {
"type": "string",
"index": "not_analyzed"
},
// more fields, snipped
}
},
Run Code Online (Sandbox Code Playgroud)
像查询字符串q=tags.name:MyTag永远不会返回任何结果.使用嵌套术语查询或过滤器表达的相同查询有效.
谢谢! - 莎拉特
| 归档时间: |
|
| 查看次数: |
1389 次 |
| 最近记录: |