Sphinx search from text with special characters

时间:2017-08-04 12:22:57

标签: sphinx

Please help me on sphinx search with extended search mode - I need to find "fathers day" query string from "Today is fathers's day" text. While searching, this text was ignored because of single quote in it. Is there any way to retrieve this?

1 个答案:

答案 0 :(得分:2)

如果真的在谈论father's,(fathers's只是你帖子中的拼写错误);一种可能性是向ignore_chars

添加引用

http://sphinxsearch.com/docs/current.html#conf-ignore-chars

在建立索引期间,它会“消失”,因此Today is father's day只会被编入索引为Today is fathers day

真正处理fathers's比较棘手。可能用regexp_filter修复它。

regexp_filter = (\w)s's\b => \1s

可能希望将其与形态学相结合 - 即一个词干分析器。 http://sphinxsearch.com/docs/current.html#conf-morphology