更改SOLR默认连词 [英] Change SOLR Default Conjunction

查看:78
本文介绍了更改SOLR默认连词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个嵌入了SOLR的应用程序. SOLR在Tomcat的webapps区域中像一场战争一样在奔跑. 是否有一个SOLR配置可以让我切换默认的SOLR行为,以使搜索假定'AND'而不是'OR'作为联合运算符?

I'm using an app that has SOLR embedded. SOLR is running as a war in the webapps area of Tomcat. Is there a SOLR configuration that allows me to switch the default SOLR behavior for searches to assume 'AND' instead of 'OR' as the conjunctive operator?

推荐答案

在架构文件中(通常为schema.xml)添加(或修改@Madbreaks)此行

Add (or modify h/t @Madbreaks ) this line in your schema file (usually schema.xml)

<solrQueryParser defaultOperator="AND"/>

这篇关于更改SOLR默认连词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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