{
"query": {
"bool": {
"must": [
{
"bool": {
"should": [
{
"term": {
"content": {
"value": "远磐",
"boost": 5757544300000000000
}
}
},
{
"term": {
"title": {
"value": "远磐",
"boost": 5757544300000000000
}
}
}
],
"minimum_should_match": "1"
}
},
{
"bool": {
"should": [
{
"term": {
"title": {
"value": "互联",
"boost": 6456151
}
}
},
{
"term": {
"content": {
"value": "杭州远磐互联科技有限公司",
"boost": 3.3149317e+37
}
}
}
],
"minimum_should_match": "1"
}
}
]
}
},
"from": 0,
"size": 10
}
当我在搜索结果中创建弹性搜索查询时,发生错误。在ElasticSearch中查询时发生错误
我不知道这个错误。
错误:
IndexOutOfBoundsException[docID must be >= 0 and < maxDoc=158 (got docID=2147457971)]
和所有命中的得分是零。
enter image description here 整个错误:
任何帮助,请!
Regards
为什么你必须有另一个布尔?如果你可以上传你的需求和你的样本文件,会更有帮助吗? –
该要求可描述为sql如下: 从db 选择文档 其中(field1 =“XXXX”或field2 =“*****”)和(field1 =“$$$$”或field3 =“&&&&”) – Daniel
我发布了正确的查询作为答案,希望能够解决您的问题。 –