语法之间的Solr [英] Solr between syntax

查看:73
本文介绍了语法之间的Solr的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了solr很棒,但是在价格范围内选择时卡住了.我想选择价格在20到50之间的所有产品,但似乎不起作用.solr语法是什么:费用> 20,且费用< 50还​​是20到50之间的费用?

I have installed solr is awesome but i'm stuck when selecting price within range.I want to select all the products with the cost between 20 and 50 but it doesn't seem to work.What is the solr syntax for: cost > 20 AND cost < 50 or cost BETWEEN 20 AND 50 ?

推荐答案

简短答案:参见 Lucene查询解析器语法.

更长的答案:使用此语法进行互斥搜索(您的示例费用> 20 AND费用<50):

Longer answer: use this syntax for exclusive search (your example of cost > 20 AND cost <50):

cost:{20 TO 50}

以及用于包容性搜索的以下语法(成本> = 20且成本< = 50):

and this syntax for inclusive search (cost >= 20 AND cost <= 50):

cost:[20 TO 50]

这篇关于语法之间的Solr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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