Drupal 的搜索模块可以搜索子字符串吗? (部分搜索)
Drupal的核心搜索模块,仅搜索关键字,例如“三明治”。我可以让它使用子字符串(例如“sandw”)进行搜索并返回我的三明治结果吗?
也许有一个插件可以做到这一点?
Drupal's core search module, only searches for keywords, e.g. "sandwich". Can I make it search with a substring e.g. "sandw" and return my sandwich-results?
Maybe there is a plugin that does that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
最直接的模块可能是模糊搜索。我没试过。如果您在中小型网站上有更高级的搜索需求,Search Lucene API 是一个很好的解决方案。对于较大的站点或真正高级的需求,Solr 是首选解决方案。
The most direct module for it is probably Fuzzy Search. I have not tried it. If you have more advanced search needs on a small to medium sized site, Search Lucene API is a fine solution. For a larger site, or truly advanced needs, Solr is the premiere solution.
最近我为 Drupal 的核心搜索模块制作了一个补丁,为其提供部分搜索(又名 n-gram 搜索) 能力。这是针对 Drupal 6.15 和 6.15 进行测试的。 6.16 版本。您可能想了解修补。
另一方面,您可以使用 Apache Solr 搜索集成、搜索 Lucene API 模块或其他需要更多时间实现的第三方搜索解决方案。
PorterStemmer 模块有自己不同的故事,您可能也会感兴趣。
Recently I made a patch for Drupal's core search module to provide it with partial search (aka n-gram searches) ability. This is tested against Drupal 6.15 & 6.16 releases. You might want to read about patching.
On the other hand you can make use of Apache Solr Search Integration, Search Lucene API modules or other 3rd-party search solutions which takes more time to implement.
PorterStemmer module has its own different story in which you might be interested, too.
是的。模糊搜索(模块)可以做到这一点。 https://drupal.org/project/fuzzysearch
Yes. Fuzzy Search (module) does it. https://drupal.org/project/fuzzysearch
Drupal Finder 以某种方式做到这一点,即:它具有自动提示功能,因此如果您启动 typech
sand
它应该建议您一个包含sandwich
的节点。Drupal Finder does it somehow, namely: it has an autosuggest feature, so if You start typich
sand
it should suggest You a node containingsandwich
.