Levent Ali
2008-Jan-04  16:50 UTC
[Ferret-talk] Records not in search results until I recreate record index
our object A has three properties
title - a straight db field,
open_for_search - a method which returns yes or no
site_search - which is a list of codes based on a has_many relationship
so our api accepts a title and a list of sites
creates object A with
object = Object.new
object.title = thetitle
sites = Site.find_all_by_whatever([whatever])
object.save
object.sites << sites
Then because sites were added after the object was created we do
object.ferret_create
If we do Object.find_by_contents(''title:thetitle AND
site_search:sitecode'') we get nothing
If we do Object.find_by_contents(''title:thetitle'') we get the
record and
if we do
Object.find_by_contents(''title:thetitle'').first.to_doc the
site_search
field is populated correctly in ferret
We have to now manually do ferret_create again from script/console
before the query returns the results...
Any ideas?
-- 
Posted via http://www.ruby-forum.com/.
