【发布时间】:2017-09-05 20:56:05
【问题描述】:
我们在代码中使用 Lucene v3.6。我们首先对数据进行索引,然后也使用 Lucene 搜索来搜索术语。使用 Luke 我已经确认,当我们为 Hashimoto's 之类的术语编制索引时,它会使用我假设的撇号进行索引(因为当我从获得的结果中搜索 Hashimoto 时,我可以确认相应的字段值包含 Hashimoto's 的撇号。但是,当我搜索桥本的(甚至在卢克)时,我没有得到该领域的任何结果。例如
+names.name:hashimoto (works and returns multiple results some which have Hashimoto's as a term)
+names.name:hashimoto's (does not work - no results)
在这两种情况下,我都使用 StandardAnalyzer,据我了解,它应该可以毫无问题地处理撇号。
【问题讨论】: