elasticsearch,Java,elasticsearch" /> elasticsearch,Java,elasticsearch" />

Java ElasticSearch中的过滤查询

Java ElasticSearch中的过滤查询,java,elasticsearch,Java,elasticsearch,我在弹性搜索中有两个commentRootIdentityFields,如下所示 commentRootIdentityFields": [ { "key": "endPointId", "value": "dummy-endpoint" }, { "key": "api_id", "value": "AU5ohQ6CQ50uGOgYbW0a" }, { "key": "projectId", "value": "project-97cafcff-bc96-4b01-bd3b-fce662166

我在弹性搜索中有两个
commentRootIdentityFields
,如下所示

commentRootIdentityFields": [
{
"key": "endPointId",
"value": "dummy-endpoint"
},
{
"key": "api_id",
"value": "AU5ohQ6CQ50uGOgYbW0a"
},
{
"key": "projectId",
"value": "project-97cafcff-bc96-4b01-bd3b-fce66216674b"
}
]


现在,我希望只使用项目id和端点进行搜索查询,以便Elasticsearch只返回第二个
commentRootIdentifier
字段。现在我正在使用BooleanQueryFilter,但它必须运行。

commentRootIdentityFields
应该是嵌套的。“commentRootIdentityFields”可以有多个端点/projectId吗“?否,它将具有唯一的键值对。
commentRootIdentityFields
应该是嵌套的。'commentRootIdentityFields'是否可以具有多个端点/projectId”?否,它将具有唯一的键值对。
commentRootIdentityFields": [
{
"key": "projectId",
"value": "project-97cafcff-bc96-4b01-bd3b-fce66216674b"
},
{
"key": "endPointId",
"value": "dummy-endpoint"
}
]