Forum: Ferret Updating index when non-rails app creates entries?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Scott Wilson (Guest)
on 2007-01-18 18:09
I have a database shared between a Rails app (gui) and a Java app
(daemon). When the java app periodically updates the database, this
isn't reflected in Ferret indexes visible via acts_as_ferret in Rails.
How do I trigger re-indexing? Do I just make my Java daemon delete the
index files, or is there something cleverer than that..?

Thanks!
Jens K. (Guest)
on 2007-01-19 17:30
(Received via mailing list)
On Thu, Jan 18, 2007 at 05:09:31PM +0100, Scott Wilson wrote:
> I have a database shared between a Rails app (gui) and a Java app
> (daemon). When the java app periodically updates the database, this
> isn't reflected in Ferret indexes visible via acts_as_ferret in Rails.
> How do I trigger re-indexing? Do I just make my Java daemon delete the
> index files, or is there something cleverer than that..?

you could have some backgroundrb process regularly check your records
for changes (i.e. by checking a 'to_index' flag or just the updated_at
value). That process could then call ferret_update on the records that
have been updated.

cheers,
Jens


--
webit! Gesellschaft für neue Medien mbH          www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer 
removed_email_address@domain.invalid
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
This topic is locked and can not be replied to.