I don't think there's an existing tool, but it shouldn't be too hard to create.

Create a new SegmentInfos(), then call its .read(oldDir) to read all
segments.  Look up the SegmentInfo(s) you want to copy and call their
.files() methods to see which files to copy.  Copy them.  Remove all
other segments from the SegmentInfos, then .write(newDir).

Mike

On Wed, Apr 14, 2010 at 6:52 PM, Lance Norskog <[email protected]> wrote:
> Is there a program available that makes a new index with one or more
> segments from an existing index? (The immediate use case for this is
> doing forensics on corrupted indexes.)
>
> The user interface would be:
> extract -segments _ab,_g9 oldindex newindex
>
> This would copy the files for segments _ab and _g9 into a new
> directory and generate a segments.gen for just those two segments. Is
> this all that's needed?
>
> --
> Lance Norskog
> [email protected]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to