Search problems

In my last post I said that I was using acts_as_ferret. However I was finding it difficult to create an index for a certain section of the site. I think this was due to me having null fields some of the database fields. I could nt change this.

When I was having problems I turned to acts_as_searchable . As the post states the search plugin uses HyperEstraier which is an opensource search engine. It seems to be very good and above all (for me) the UTF support seems excellent. This is demenstroated by having a Japenese language search demo on their site.

I managed to get it to work :) I will post how in the next couple of days.

My first thoughs about HyperEstraier is that it has some very good features, but most of the features I am not going to use in the near future. Overall the set up is a bit more invloved then ferret, this is because you need to run a deamon.

More thoughts soon!

Hamza

acts_as_ferret error

I started using the acts_as_ferret plugin for ruby on rails today. I was having a problem with the site not getting indexed – After putting the acts_as_ferret in the desired models, I searched for words that I knew existed and i was not getting any responses. I figured out that it was not being indexed. if the index directory does not exist than the plugin calls rebuild_index method. This is supposed to go through your database and create the index. The app was failing executing the rebuild_index method. I googled the error and came across this post It was an error because i was using Unicode. So I added the following to my environment.rb file and it has indexed the files :


    ENV[’LANG’] = ‘en_GB.UTF-8′
    ENV[’LC_TIME’] = ‘C’

All I have to do now is figure out how to use ferret :)

Hamza