Lucene.net 搜索未返回带有撇号或单引号的结果?
我在我的项目中有一个搜索机制,我使用 lucene.net 进行搜索,我得到了我搜索的所有句子的准确结果,除了那些以“The”开头的句子,但我已经解决了。但我发现另一个问题,Lucene.net 搜索结果不返回包含撇号或单引号的值。有谁知道为什么会这样?这真的是 lucene.net 的一个错误吗?或者是否有任何机制可以将结果包含在其中?
例如,我搜索了单词“The Lorem”,并且我得到了类似的结果
“Lorem”
“突出显示动画(加入点)为没有轮廓的黄色形状”
“直线上的 60\120 度角(突出显示 120 度角)”
但预期结果是
<强>“洛雷姆”
“没有轮廓的黄色形状的高亮动画(连接点)”
“直线上的 60\120 度角(120 度角高亮显示)”
“洛雷姆的”
“洛雷姆的”
I have a search mechanism in my project where i was using lucene.net for searching, I got accurate results for all sentences which i search except for those which starts with "The", but that i have resolved. But i found another issue that Lucene.net search results not returning values which contains aphostrophe's or single quotes. Do anyone know why is that so? Is it really a bug with lucene.net? Or is there any mechanism to include results with aphostrophe's in it?
For example I have searched for the word "The Lorem" and i got the result like
"Lorem"
"Highlight animation (join dots) for yellow shape without outline"
"angles of 60\120 degrees on a straight line (120 degree angle highlighted)"
but the expected result is
"Lorem"
"Highlight animation (join dots) for yellow shape without outline"
"angles of 60\120 degrees on a straight line (120 degree angle highlighted)"
"The Lorem's"
"The Lorem's"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这取决于分析器如何从您的文本创建标记
,例如:
输入:[The Lorem's]
WhitespaceAnalyzer --> [The] [Lorem 的]
StandardAnalyzer --> [lorem]
SimpleAnalyzer --> [the] [lorem] [s]
It depends on how the analyzers create tokens from your text
Ex:
Input: [The Lorem's]
WhitespaceAnalyzer --> [The] [Lorem's]
StandardAnalyzer --> [lorem]
SimpleAnalyzer --> [the] [lorem] [s]