Solr 关于处理程序解析和转义的问题
我有几个关于 Solr 使用的问题:
- 某些请求可以发送到不同的路径(处理程序?)。例如,MoreLikeThis 组件可以发送到 /select 或 /mlt。
我在 Solr wiki 中找到了这两个链接:
这种设置背后的原因是什么?如果我决定将 MoreLikeThis 请求发送到 /mlt 是否意味着我无法利用任何 /select 特定调用 - 如果甚至存在这样的事情 - 例如构面 - ?如果没有,是否可以配置 /select 路径来处理从拼写检查到集群的所有请求?
- 如何在 Lucene 中转义双字符特殊字符串(&&、||)?
http://lucene.apache.org/java/2_9_1/queryparsersyntax .html#Escaping+Special+Characters
我是只转义第一个字符 (\&&) 还是同时转义两个字符?我什么时候需要逃离他们?我在 Solr 包中提供的示例服务器上执行的一些测试没有得出结论:
http://localhost:8983/solr/select/?q=manu:%22apple%20%26%26%22%20AND%20manu:% 22computer%22
仍然返回结果,
I have a couple of questions regarding Solr usage:
- Certain requests can be sent to different paths (handlers?). For example, the MoreLikeThis component can being sent to either /select or /mlt.
I have found these two links in the Solr wiki:
What is the reasoning behind this setup? If I decide to send my MoreLikeThis requests to /mlt does this mean I can not utilize any /select specific calls - if there is even such a thing - such as facets - ? If not, can a /select path can be configured to handle all requests from Spellcheck to Clustering?
- How do you escape double character special strings (&&, ||) in Lucene?
http://lucene.apache.org/java/2_9_1/queryparsersyntax.html#Escaping+Special+Characters
Do I escape the first character only (\&&) or do I escape both? And when do I need to escape them? A couple of tests that I performed on the example server provided in the Solr package were inconclusive:
http://localhost:8983/solr/select/?q=manu:%22apple%20%26%26%22%20AND%20manu:%22computer%22
Still returns results,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1) MoreLikeThisHandler 背后的基本原理在 Solr wiki 中有解释:
2)你需要转义每一个字符。
1) The rationale behind MoreLikeThisHandler is explained in the Solr wiki:
2) You need to escape every single character.