You could check the index version. See
http://wiki.apache.org/solr/SolrReplication. Every time a commit is issued,
the index version is incremented.

but you could also use the "backupAfter" feature, explained also in
http://wiki.apache.org/solr/SolrReplication

Tomás

On Mon, Apr 16, 2012 at 11:07 AM, Peter Dikant <peter.dik...@mgm-tp.com>wrote:

> Hi there,
>
> we have a Solr index which is mostly used for search queries. We add new
> documents to the index only once a day. We want to backup the index files
> once the new documents have been indexed and committed.
>
> Our current solution with Solr 1.4 is to monitor the "optimized" flag of
> the index. Once the index is no longer optimized, we assume that we need to
> start a backup. The backup is run as a postOptimize script. So we only
> trigger the optimize and the backup is done automatically.
>
> Now with Solr 3.5 the isOptimized() method has been marked deprecated with
> the comment that one should check the segment count with
> getSequentialSubReaders().
>
> Is it safe to assume that the segment count will be greater than 1 for any
> index which contains committed documents and is not optimized? Is it
> guaranteed that once the maximum segment count has been reached and the
> segments have been merged, that the segment count will still be greater
> than 1?
>
> Is there a better way to detect changes in an index?
>
> Thanks,
>  Peter
>
> --
> mgm technology partners GmbH
> Frankfurter Ring 105a
> 80807 München
> Tel. +49 (89) 35 86 80-321
> Fax +49 (89) 35 86 80-288
> E-Mail peter.dik...@mgm-tp.com
> Innovation Implemented.
> Sitz der Gesellschaft: München
> Geschäftsführer: Hamarz Mehmanesh
> Handelsregister: AG München HRB 161298
>
> _________________________________________________________________________________________
> ACHTUNG: Die Information in dieser E-Mail ist vertraulich und unterliegt
> zusätzlich gesetzlichen Schutzrechten. Sie ist nur für die genannten
> Empfänger bestimmt. Wenn Sie diese Nachricht irrtümlich erhalten haben,
> benachrichtigen Sie uns bitte unverzüglich durch Antwort auf diese E-Mail
> oder durch Anruf unter der obigen Nummer und löschen Sie die E-Mail samt
> aller Anlagen. Beachten Sie bitte, dass jede nicht genehmigte
> Kenntnisnahme, Kopie, Weiterverbreitung oder anderweitige Verwendung der
> Information verboten ist. Vielen Dank.
> NOTICE: The information contained in this e-mail is confidential or may
> otherwise be legally privileged. It is intended for the named recipient
> only. If you have received it in error, please notify us immediately by
> reply or by calling the telephone number above and delete this message and
> all its attachments. Please note that any unauthorized review, copying,
> disclosing or otherwise making use of the information is strictly
> prohibited. Thank you.
>
>

Reply via email to