[英]Lucene and forward slash
In my index there is a value companyName:opel/vauxhall在我的索引中有一个值 companyName:opel/vauxhall
Searching for "opel/vauxhall" returns the correct results.搜索“欧宝/沃克斯豪尔”会返回正确的结果。
Searching for "opel/*" returns nothing.搜索“opel/*”不会返回任何结果。
Currently I'm replacing the '/' with spaces.目前我正在用空格替换“/”。 But that does give my code a bit of a smell.
但这确实让我的代码有点味道。
Any better ideas?有更好的想法吗?
This kind of problem is almost always caused by the analyzer used for indexing and searching (parsing the query).这种问题几乎总是由用于索引和搜索(解析查询)的分析器引起的。
Try using a different analyzer, for example StopAnalyzer.尝试使用不同的分析器,例如 StopAnalyzer。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.