Hi,
I need to merge several indexes (I call them incremental index) with my
main index.
Each incremental index can contain the same url's of the main index,
that's why I have a list of url's to update, that I will delete from the
main index before merging with an incremental index.
I have also a list of urls to delete,
Then after these operations I can merge the indexes.
I am not sure about the operations Open / Close on the Index Writer,
I may need some help ...
for i=0 ; i < list_increment_indexes.size() ; ++i
{ // BEGIN WHILE
1. OPEN A SECOND READER ON THE MAININDEX
(for not interrupting user queries on
the main indexreader on the main index)
2. DELETE DOCS TO BE DELETED
DELETE DOCS TO BE UPDATED
3. CLOSE THE SECOND READER ON THE MAIN INDEX ==> FLUSH DELETIONS !!
4. RE-OPEN A SECOND READER ON THE MAIN INDEX FOR MERGING
5. OPEN A READER ON THE INCREMENTAL INDEX
6. OPEN AN INDEXWRITER
TO MERGE THE READER ON THE INCREMENTAL INDEX
WITH THE READER ON THE MAIN INDEX
7. CLOSE THE INDEXWRITER
8. CLOSE THE SECOND READER ON THE MAIN INDEX
9. CLOSE THE READER ON THE INCREMENTAL INDEX
} // END WHILE !
10. CLOSE THE INDEXSEARCHER
11. CLOSE THE MAIN INDEXREADER ON THE MAIN INDEX
12. OPEN A NEW READER ON THE INDEX
I am not sure if I can open the idnexwriter *before* the loop and close
it *outside*,
So I do it in the loop for each incremental index for now on ...
__________________________________
Matt
============================================
Internet communications are not secure and therefore Fortis Banque Luxembourg
S.A. does not accept legal responsibility for the contents of this message. The
information contained in this e-mail is confidential and may be legally
privileged. It is intended solely for the addressee. If you are not the
intended recipient, any disclosure, copying, distribution or any action taken
or omitted to be taken in reliance on it, is prohibited and may be unlawful.
Nothing in the message is capable or intended to create any legally binding
obligations on either party and it is not intended to provide legal advice.
============================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]