lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From petite_abeille <petite_abei...@mac.com>
Subject Re: IndexReader.delete(Term)?
Date Wed, 27 Aug 2003 00:11:07 GMT
Hi Erik,

On Wednesday, Aug 27, 2003, Erik Hatcher wrote:

> What you are doing looks fine to me.  I'm sure these are obvious 
> questions, kinda like "is your computer plugged in?", but here goes:
>
> - How are you determining that the document is still there?  With an 
> IndexReader?  IndexSearcher?
> - A freshly created (i.e. after the delete) Index[Searcher|Reader]?
> - And finally, did you remember to recompile?!  :))  (just kidding)

Thanks for the moral support :)

In any case, hard liquors and coding doesn't always mix well together, 
so obviously I was shooting myself in the foot...

For the record, I'm using a RAMDirectory which then gets flushed into a 
FSDirectory.

Deleting something means checking both the RAM and FS directory. Which 
is what I do.

But... because of the internal caching done by the IndexWriter, a 
document is not made available straight away... therefore 
IndexReader.delete(Term) returning zero and me banging my head against 
the wall... adjusting the order of operations did solve the "problem"...

Which brings a question: is there a way to influence the IndexWriter's 
internal RAM cache, beside closing or optimizing a writer?

Cheers,

PA.


Mime
View raw message