lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karl wettin <>
Subject Lockless read-only deletions in IndexReader?
Date Mon, 20 Aug 2007 02:40:55 GMT
I want to set documents in my IndexReader as deleted, but I will  
never commit these deletions. Sort of a filter on a reader rather  
than on a searcher, and no write-locks.

Can I do that out of the box?

Perhaps I can pass down a IndexDeletionPolicy to my IndexWriter that  
ignores deletions from the IndexReader(s) to avoid the lock?

Changing the directory lock factory it will effect the IndexWriter  
locks too? So that would not be an option, or?

I could go hacking in IndexReader, definalizing it for decoration of  
deleteDocument(int), or something like that, but would really prefere  
not to.

This is for a transactional layer on top of Lucene, where I combine  
the system index with a transactional index. Updated documents that  
are represented in the transaction index must be filtered out from  
the system index at IndexReader level without creating write-locks.  
undeleteAll() would be an option if there was no locks -- more than  
one transaction could be updating documents at the same time.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message