Big ElasticSearch bool查询:以某种方式标记符合特定查询条件的项目 [英] Big ElasticSearch bool query: Somehow mark items that match a particular piece of the query
问题描述
在 bool
之间加入的子查询。我需要知道哪个结果项目匹配哪个应该
的查询。
我排序然后限制查询大小。我不能将查询分解成多个查询,然后由于大量的数据将被返回,因此为了稍后对整个结果集进行排序并再次截断大小,因此可能会将查询分解为多个查询。
解决方案 有没有办法标记符合查询部分的结果, div>
是的,看看命名查询
。
I have a giant ElasticSearch query that I am executing. It consists of a number of "subqueries" joined by should
's on a bool
. I need to know which resulting items match which should
's of the query.
I sort and then limit the size of the query. I cannot split the query into multiple queries and then msearch due to the huge volume of data that would be returned in order to then later sort the full result set and again truncate to size.
Is there a way to tag results that match a portion of a query, so that I can later identify which pieces caused those results?
解决方案 Yes, have a look at Named Queries
.
这篇关于Big ElasticSearch bool查询:以某种方式标记符合特定查询条件的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文