lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norton, James" <>
Subject Sorting / Document ID renumbering
Date Thu, 17 Jun 2004 14:50:39 GMT

A while back I implemented a general purposoe document sorting mechanism using cached
document ids (similar to SortBean).  This was before sorting was added to lucene.  I 
am trying to extend this mechanism to allow incremental updates to the cache when new 
content is loaded or deleted.  In other words, sorting the new content into the existing
cache to avoid resorting the entire collection.

My problem is that lucene renumbers documents ids at certain times when new content is
loaded, including reclaiming deleted ids.  So potentially every document id can change
when new content is loaded.  I don't mind this when an explicit optimize is called, because
I can reload the cache from scratch, but it is too inefficient to do this every time a 
batch of documents is loaded.  

So I have two questions.  First, is there a way to prevent document id renumbering
(except during explicit calls to optimize)?  (I have played around with the merge factor 
but it does not seem to work the way I expected, i.e., setting it very high does not 
prevent the renumbering).  Second, does the new sorting mechanism in lucene allow
(efficient)incremental updates? 



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

View raw message