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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]