Big ElasticSearch bool查询:以某种方式标记符合特定查询条件的项目 [英] Big ElasticSearch bool query: Somehow mark items that match a particular piece of the query

查看:234
本文介绍了Big ElasticSearch bool查询:以某种方式标记符合特定查询条件的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个巨大的ElasticSearch查询,我正在执行。它包含一些 bool 之间加入的子查询。我需要知道哪个结果项目匹配哪个应该的查询。



我排序然后限制查询大小。我不能将查询分解成多个查询,然后由于大量的数据将被返回,因此为了稍后对整个结果集进行排序并再次截断大小,因此可能会将查询分解为多个查询。


解决方案

有没有办法标记符合查询部分的结果, div>

是的,看看命名查询



http://www.elasticsearch.org/guide/en /elasticsearch/reference/current/search-request-named-queries-and-filters.html


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.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-named-queries-and-filters.html

这篇关于Big ElasticSearch bool查询:以某种方式标记符合特定查询条件的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆