Thinking_Sphinx 搜索选项
我希望用户能够通过我的thinking_sphinx文本框进行搜索像木头这样的词,让它拉起“木头”和“木工”。 如果用户输入 wood*,这句话很好,但如果他们只输入 wood 而没有 *,则不会显示任何结果。 是否有办法无需输入星号即可获得木材*的结果。 大多数用户并不那么聪明。
Similar Stack Overflow Question
I want users to be able to search through my thinking_sphinx text box a word like wood and have it pull up Wooden and Woodworking. This words fine if the user types in wood*, but if they type in just wood with no * then no results are shown. If there a way to get the results of wood* without having to type in the asterisk. Most users aren't that smart.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以在将用户数据发送到搜索之前在其末尾附加一个星号吗?
can you append an asterisk at the end of user data before sending it to search?
我认为您可以在 sphinx 配置中通过单词形式实现您想要实现的目标。 请参阅此处的文档: http://sphinxsearch.com/docs/current.html#conf -词形。
您可以通过
sphinx.yml
文件使用更高级的 Sphinx 配置。 请参阅以下内容: http://freelancing-god.github.com/ts/ zh/advanced_config.htmlI think you could get what you're trying to achieve with wordforms in your sphinx configuration. See the documentation here: http://sphinxsearch.com/docs/current.html#conf-wordforms.
You can utilize more advanced Sphinx configuration with a
sphinx.yml
file. See the following: http://freelancing-god.github.com/ts/en/advanced_config.html只需通过:star => 正确的;)
just pass :star => true along ;)