简体   繁体   English

带有“#”的Lucene.Net搜索不起作用

[英]Lucene.Net Search with “#” Not working

I'm using lucene.net to search records in my website. 我正在使用lucene.net在我的网站中搜索记录。 I have lots of records with the special character hash ("#") like "C#", "C#.Net", etc... 我有很多带有特殊字符哈希(“#”)的记录,例如“ C#”,“ C#.Net”等。

But when I search using the term "C#" lucene is not returning any results. 但是,当我使用术语“ C#”进行搜索时,lucene不会返回任何结果。 I have checked lucene Escaping Special Characters, but "#" is not in this characters list. 我已经检查了lucene转义特殊字符,但是“#”不在此字符列表中。

Is there a good way to search with the term "#" on Lucene.Net? 在Lucene.Net上,有没有一种很好的方法来搜索术语“#”?

I have created my own Analyzer using the WhitespaceTokenizer and it wroked. 我已经使用WhitespaceTokenizer创建了自己的分析器,并且它崩溃了。

https://issues.apache.org/jira/browse/LUCENENET-595 https://issues.apache.org/jira/browse/LUCENENET-595

Thanks, Singaravelu 谢谢,Singaravelu

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM