The source code looks like this:
public final synchronized void addIndexes(Directory[] dirs)
throws IOException {
optimize(); // start with zero or
1 seg
for (int i = 0; i < dirs.length; i++) {
SegmentInfos sis = new SegmentInfos(); // read infos from
dir
sis.read(dirs[i]);
for (int j = 0; j < sis.size(); j++) {
segmentInfos.addElement(sis.info(j)); // add each info
}
}
optimize(); // final cleanup
}
So I think the original directories/indices should not be modified in
any way. Are you sure your application is not deleting them?
Otis
--- Lex Lawrence <[EMAIL PROTECTED]> wrote:
> Hello-
> I am using org.apache.lucene.index.IndexWriter.addIndexes(Directory[]
> dirs)
> to merge several indices into one. The resulting index appears to
> work
> fine, but afterward the original indices seem to have been completely
>
> emptied.
>
> I can deal with that, but I just wanted to check: Is this method
> supposed to
> alter the indices in the 'dirs' parameter? It's not mentioned in the
>
> javadoc.
>
> Thanks- Lex
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>