lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karl wettin <>
Subject Re: Sorting
Date Sat, 29 Jul 2006 20:42:04 GMT
On Sat, 2006-07-29 at 12:39 -0700, Jason Calabrese wrote:
> One fast way to make an alphabetic sort very fast is to presort your
> docs before adding them to the index.  If you do this you can then
> just sort by index order.  We are using this for a large index (1
> million+ docs) and it works very good, and seems even slightly faster
> than relevance sorting.
> Using this approach may create some maintainance issues since you
> can't add a new doc to the index at a specified position.  Instead you
> will need to re-index everything. 

Instead of above I would probably choose an int[index size] where each
position in the array represents the global order of that document. It's
much easier to re-order that than re-indexing the whole corpus every
time you want to insert something.

It limits your corpus to 2 billion items (Integer.MAX_VALUE). And it
will consume 32 bits of RAM per document.

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

View raw message