[英]Elasticsearch query with fields not working
嗨,我是弹性搜索数据库的新手,当我想搜索字段时,我得到以下错误。 帮我解决这个问题。
Trace: [query_parsing_exception] [filtered] query does not support [fields], with { index=test_database line=1 col=58 }
我要搜索的代码:
client.search({
index: 'test_database',
body: {
query : {
match_all : {},
fields: ["price","brand"]
},
}
})
你可以试试这个。 因为,匹配所有查询不支持字段。
client.search({
index: 'test_database',
body: {
fields: ["price","brand"],
query : {
match_all : {}
}
}
})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.