lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject RE: Sorting Options for Query Results
Date Mon, 19 Nov 2001 17:24:00 GMT
> From: []
> I think this still works if the the document number continue 
> to increase 
> by one when documents are added incrementally.
> Does anyone know if this is true (I haven't looked at the code yet).

Yes, that is true, so long as you do not delete documents.  Deletions are
removed the next time the segment containing them is merged.  You can force
removal of all deleted documents by optimizing an index.

> If so, you might increase your fieldValues array when you 
> index the new 
> documents?
> Potentially even serializing the array so it can persist or 
> be added to 
> off-line.

Those are good suggestions.

Also, I forgot to note earlier: you can drastically reduce the memory
requirements of this approach if a field value can be represented as an int
or long (e.g., a date).  Java's String class uses a lot of memory, around 40
bytes for a 10-character string!


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

View raw message