[英]Ruby on Rails - Search gem that fits my needs
I am looking for a search gem and found searchkick really interesting. 我在寻找搜索宝,发现searchkick真的很有趣。
I've got a few questions before implementing it 在实施之前,我有几个问题
thanks 谢谢
you can use elasticsearch . 您可以使用elasticsearch 。 you can work with only one search box for all of it.
您只能使用一个搜索框进行搜索。 it's a little complicated but it does support relations too
这有点复杂,但它确实也支持关系
You can use multi-search in Searchkick for this purpose. 为此,您可以在Searchkick中使用多重搜索。 https://github.com/ankane/searchkick#multi-search
https://github.com/ankane/searchkick#multi-search
Thats exactly what you're looking for: https://github.com/activerecord-hackery/ransack 那正是您正在寻找的东西: https : //github.com/activerecord-hackery/ransack
In your Gemfile, for the last officially released gem: 在您的Gemfile中,查看最后一个正式发布的gem:
gem 'ransack'
If you would like to use the latest updates (recommended), use the master branch: 如果要使用最新更新(推荐),请使用master分支:
gem 'ransack', github: 'activerecord-hackery/ransack'
And here's an article about how to use it basicly: https://medium.com/@jaspercurry/searching-and-sorting-on-rails-with-ransack-560e862e650a 这是有关如何基本使用它的文章: https : //medium.com/@jaspercurry/searching-and-sorting-on-rails-with-ransack-560e862e650a
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.