On 12/21/06, escher2k <[EMAIL PROTECTED]> wrote:
Hi,
  We currently use Lucene to do index user data every couple of hours - the
index is completely rebuilt,
the old index is archived and the new one copied over to the directory.

Example -

/bin/cp ${LOG_FILE} ${CRON_ROOT}/index/help/
/bin/rm -rf ${INDEX_ROOT}/archive/help.${DATE}
/bin/cp -R ${CRON_ROOT}/index/help ${INDEX_ROOT}/help.new
/bin/mv ${INDEX_ROOT}/help ${INDEX_ROOT}/archive/help.${DATE}
/bin/mv ${INDEX_ROOT}/help.new ${INDEX_ROOT}/help

This works fine since the index is retrieved every time from the disk. Is it
possible to do the same with Solr ?

Yes, this will work.  This is sort of what the index distribution
scripts do to install a new index snapshot in a master/slave
configuration.

You also don't have to build in a different directory if you don't
want to.  Solr supports incremental updates.

Assuming we also use caching to speed up the retrieval, is there a way to
invalidate some/all caches when
this done ?

It's done automatically.  You will need to issue a <commit/> to solr
to get it to read the new index (open a new searcher), and new caches
will be associated with that new searcher.

-Yonik

Reply via email to