Are you trying to copy the index by an external process not running in
the Solr JVM? I believe this is risky if the Solr JVM is running at
the same time. For example segments can be deleted by Solr.
There might also be closed segments that you do not need but that are
still on the disk (no longer part of the current commit point).

You could look at backup options in Solr, I believe they basically do
what you need (I'm not familiar with what's available but I'm sure you
can find the info).

Ilan


On Tue, Jan 5, 2021 at 12:46 PM Jacob Ward <jw...@brandwatch.com> wrote:
>
> Hello,
>
> I am looking for a way to identify the open segment files in a lucene
> index, so that I can export only the closed segments (and the segmentsN
> file). My current ideas are:
>
> - Ignore any segment files newer than the segmentsN file.
> OR
> - Open the segmentsN file using Lucene core's SegmentInfos class (which I
> presume would allow me to identify which are the closed segments).
>
> Could anyone provide suggestions on how to do this best? Ideally I'd like
> to do this without the SegmentInfos class if there is a suitable method.
>
> Thanks.
>
> --
>
> Jacob Ward    |    Graduate Data Infrastructure Engineer
>
> jw...@brandwatch.com
>
>
> NEW YORK   | BOSTON   | BRIGHTON   | LONDON   | BERLIN |   STUTTGART |
> PARIS   | SINGAPORE | SYDNEY

Reply via email to