Hi,
I’m having some problems with acts_as_ferret and indexing. I’ve got a
simple 5 column table, and a corresponding Ruby model. I loaded 9 rows
directly into the table using mysql (for live it’ll be about .5mil rows)
and configured a Rails search page along the exact same lines as
ferret_demo.
Unfortunately, search wouldn’t return any results; following the advice
given to other posters, I deleted the index/development/[ModelName]
folder. I expected then for the index to automatically get rebuilt, but
unfortunately any search then resulted in:
: Error occured at <fs_store.c>:318
Error: exception 2 not handled: Couldn’t open the file to read
vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:284:in search' vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:284:in
find_id_by_contents’
vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb:246:in
find_by_contents' #{RAILS_ROOT}/app/controllers/search_controller.rb:55:in
search’
I noticed that the index/development/[ModelName] folder was being
recreated, but empty.
Luckily I managed to get the rebuild_index.rb script working, which
recreated the index folder structure, and then added a couple of files:
_a.cfs and segments
I can now search without error, but I don’t get any search results for
the original 9 rows in the table. I can add rows, and these extra rows
seem to cause activity in index/development/[ModelName] folder, and they
get picked up by search.
But the fundamental problem remains, that I can’t get Ferret to search
and return the original 9 rows.
What am I doing wrong?
Thanks,
Alex