UPDATE
acts_as_searchable is no longer maintained, please switch over to the new and healthy world of search_do bug-free, clear structure and paginating!
Too many crappy tutorials around, with wrong or only partial information of how to get started. Took me almost 2 hours to get it working, so here comes a short How To/Summary for future reference.
- sudo apt-get install hyperestraier
- sudo nano /etc/default/hyperestraier (change NO_START from 1 to 0) -> autostart on boot
- sudo /etc/init.d/hyperestraier start
- http://localhost:1978/ -> admin/admin -> create new nodes (xx_test/xx_dev/xx_prod)
- script/plugin install svn://poocs.net/plugins/acts_as_searchable (newer from http://github.com/scoop/acts_as_searchable/tree/master)
- database.yml (for ever environment):
estraier: host: localhost user: admin password: admin port: 1978 node: xx_dev
- >ModelName<.rb: acts_as_searchable :searchable_fields=>[:descr,:title] details
- Add all current models to the fulltext search:
script/console test
>ModelName<.reindex! - Check back in the corresponding node @ http://localhost:1978/ to see if documents have been created
- play around with >ModelName<.fulltext_search
Hope this helps

8 comments
Comments feed for this article
June 24, 2008 at 13:25
I Will Paginate Acts As Searchable « My Pragmatig life
[...] 24, 2008 in Rails | Tags: Plugin, Rails | Just relesed another small plugin, to help integrate acts_as_searchable and [...]
July 28, 2008 at 8:19
Peter D.B.
We love Hyperestraier too and nice to see someone forked the plugin on git and made some changes.
The plugin could use some more features like multimodel search (preferrably in its own class, so you can call something like Multimodel.search(:models => [...])) and transparent indexing of associated records and I really hope my employer will one day allow me to invest some time in it.
But when it comes to performance, memory footprint and stability, Hyperestraier really shines.
July 28, 2008 at 9:07
pragmatig
SomeModel.fulltext_search(‘xxx’,:raw=>true,:all_types=>true)
will give you all models, the only thing left to you is retrieving the models(iterating over the results and do a results[i] = results[i].attr(‘type’).constantize.find(results[i].attr(‘db_id’))) #pseudocode, may not work…
the multimodel approach seems appealing too, but atm i am satisfied with the features
March 31, 2009 at 2:55
Mike
Thanks for the tutorial. I’ve been trying to get this working on Mac as well for my development machine, but I’m having a ton of problems. I’m using Darwin/Mac ports to install it, but can’t see to get past step 1 after installing it.
March 31, 2009 at 6:17
pragmatig
We also had problems getting it to run on Mac, but I dunno how we fixed that
*note to self: blog more often*
March 31, 2009 at 6:46
Mike
Alright, thanks anyways. If you happen to remember it sometime, don’t forget to shoot me an e-mail.
September 26, 2009 at 23:46
Darryl
I’ve been using HE and the original acts_as_searchable in a website, but recent changes to how we’re using it has prompted a bit of research.
I realise this is a bit late, but do you know if HE can use more than one order clause? eg @title STRA, @created_at NUMD (order by title, then by date)
Or is that sort of thing a problem with plugins?
September 27, 2009 at 1:32
pragmatig
i dont know if it is possible, but it is not a plugin problem, snce the plugin just passes the given value to HE -> http://github.com/grosser/acts_as_searchable/blob/master/lib/vendor/estraierpure.rb#L253