I really like Sunspot in Rails, but it adds way too much to my slug size on heroku (10mb to 33mb). Is there a good, 开发者_运维问答much lighter alternative to Sunspot? I only need basic full text searching for two fields.
Try this meta-search. I think for a little searching it is enough.
The slug size is large because Sunspot includes a bundled instance of Solr, which is a large distribution. I believe the forthcoming 1.3 release of Sunspot splits this out into a separate gem, so the main Sunspot client gem will be a much more manageable size. 1.3 is currently out as a prerelease: https://rubygems.org/gems/sunspot/versions/1.3.0.rc4
Not too sure whether heroku does it, but since it uses pg - I don't see why tsearch2 wouldn't work, best thing is, you shouldn't need any gems (so long as you aren't afraid to write a little SQL).
Check out the IndexTank add-on and the Tanker gem.
精彩评论