solr中一个方面的多个范围 [英] Multiple ranges in a facet in solr

查看:17
本文介绍了solr中一个方面的多个范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何格式化 Solr 构面查询以包含两个页面查看范围?

How could you format a Solr facet query to include two page view ranges?

以下将仅返回 200 TO 250 范围,而 500 至 550 范围内不返回任何内容.

The following will only return the 200 TO 250 range and nothing from the 500 to 550 range.

<str name="fq">pageviews:[200 TO 250] OR [500 TO 550]</str>

我很想获得与页面浏览量在 200 到 250 之间以及在 500 到 550 之间的人匹配的记录数.

I'm keen to get the number of records matching people with pages views between 200 and 250 and between 500 and 550.

推荐答案

原来我每次都需要提字段:

Turns out I need to mention the field each time:

pageviews:[200 TO 250] OR pageviews:[500 TO 550]

这篇关于solr中一个方面的多个范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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