lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Lucene hits.length()
Date Thu, 10 Aug 2006 00:15:40 GMT
: I think, but am not certain (chime in here guys) that this is expected
: behavior. As I remember from various threads, internally indexing uses a
: RAMdir to accumulate data until it merges it with the FSDir. Since the
: searcher and indexer are separate, I assume that the searcher is looking at
: the snapshot that is on disk and missing that in the RAMdir. After you
: merge, the RAMdir data has been added to that on disk, and the two are "in
: synch".

off the top of my head, that doesn't sound right ... Lucene's file formats
and commit locks are designed to ensure that a single IndexReader (and
thus, and IndexSearcher) has a consisten view of the index from the moment
it is opened, to the moment it is closed -- regardless of what other
IndexReaders or IndexWriters are out there mucking things up. If you open
an IndexSearcher, and use it to execute a query, the number of hits you
get back should be the same if you reuse that searcher to run the same
query in 5 seconds, 5 minutes, 5 hours, or 5 days -- as long as you are
still using that same searcher, it shouldn't matter what you do with an
IndexWriter in the same process or in any other process.

can you post some sample code demonstrating the problem you are having?

If i had to guess, i'd speculate that maybe you are opening a new searcher
more often then you think.




-Hoss


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


Mime
View raw message