lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergiu Gordea <gser...@ifit.uni-klu.ac.at>
Subject Re: rebuild index
Date Thu, 22 Jul 2004 15:15:42 GMT
Because on the other hand I want to have a clean index, without any kind 
of garbage.

This is the requested funtionality of the rebuild index function.
Clean Index and don't loose data.

I was also thinking that I can delete the index location and create a 
new index, this may have the same effect as the missing
deleteAll() method. But in this case I loose all the data from index 
forever, and If  I get a error because of write lock,
I may have no index at all. Which is inacceptable for a productve system.

Anyway, thanks for ideea, It may work if I merge the indexes in my code, 
but I don't fill that this is the right way to solve the problem.

 Sergiu
 


Aviran wrote:

>Why don't you just build a new index in a different location and at the end
>add the missing documents from the old index to the new one, and then delete
>the old index.
>
>Aviran
>
>-----Original Message-----
>From: Sergiu Gordea [mailto:gsergiu@ifit.uni-klu.ac.at] 
>Sent: Thursday, July 22, 2004 10:49 AM
>To: Lucene Users List
>Subject: rebuild index
>
>
>
> Hi all,
>
> I have a question related to reindexing of documents with lucene. We want
>to implement the functinality of rebuilding lucene index. That means I want
>to delete all documents in the index and to add newer 
>versions.
>All information I need to reindex is kept in the database so that I have 
>a Term ID, which is unique.
>
>My problem is that I don't have a deleteall() method in IndexReader, and 
>I don't have undelete(int) and undelete(Term)
>methods. I have only delete(Term) and  undeleteAll() methods that can be 
>used for this action.
>
>I would like to delete all documents (just mark as deleted). Add the new 
>documents o the index and create a list of documents that were not 
>succesfully indexed,
>(from different reasons, that may depend on lucene or on our code). At 
>the end I would like to restore (mark as undeleted) the documents in the 
>list and to optimize the
>index, so that the changes to be permanetly commited in the index.
>
> Is this possible witout hacking lucene code? Any Ideas?
>
> Thanks in advance,
>
> Sergiu
> 
>
> 
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message