SOLR 中的子串匹配 [英] Substring matches within SOLR

查看:57
本文介绍了SOLR 中的子串匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法弄清楚如何使用 SOLR 找到子字符串匹配,我已经根据前缀找到了匹配,所以我可以让火腿匹配汉堡包.

I can't seem to figure out how to find substring matches with SOLR, I've figured out matches based on a prefix so I can get ham to match hamburger.

我如何搜索汉堡"以匹配汉堡?我试过 burger 但这抛出了一个错误*"或?"不允许作为 WildcardQuery 中的第一个字符.

How would I get a search for 'burger' to match hamburger as well? I tried burger but this tossed an error '*' or '?' not allowed as first character in WildcardQuery.

如何使用 SOLR 匹配子字符串?

How can I match substrings using SOLR?

推荐答案

您可以启用此功能,但它会占用大量资源(例如搜索 SuffixQuery).

You can enable this but it will be very resource hungry (e.g. search for SuffixQuery).

参见:http://lucene.472066.n3.nabble.com/Leading-Wildcard-Search-td522362.html

引用邮件列表:变通办法?想象一下,使用所有反向拼写的术语创建第二个索引(或添加另一个字段).

=>

参见添加 ReverseStringFilter https://issues.apache.org/jira/browse/LUCENE-1398

See Add ReverseStringFilter https://issues.apache.org/jira/browse/LUCENE-1398

并支持高效的前导通配符搜索:https://issues.apache.org/jira/browse/SOLR-1321

and Support for efficient leading wildcards search: https://issues.apache.org/jira/browse/SOLR-1321

目前 issues.apache.org 似乎已关闭.尝试使用例如谷歌缓存.

At the moment issues.apache.org seems down. Try to use e.g. google cache.

这篇关于SOLR 中的子串匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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