Scott Wilson
2007-Jan-18 16:09 UTC
[Ferret-talk] Updating index when non-rails app creates entries?
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! -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2007-Jan-19 10:21 UTC
[Ferret-talk] Updating index when non-rails app creates entries?
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 kraemer at webit.de Schnorrstra?e 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66