You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Palmer, Andrew MMI Woking" <an...@vnuinc.co.uk> on 2004/11/17 17:29:27 UTC

Sorting Of Index

Hi,

I have been using Lucene now for about 4 years (pre Jakarta) and the
system has worked fine.  
One feature that would be nice for my development would be the ability
to sort the index by a particular field.

There has been a marked performance improvement when the index is sorted
in the same order I am extracting the Documents.  I do not use a Query
as some of the selections would not be easy to describe this way.

I have been doing the sort in my current code, but it takes a long time
as it involves adding the records to the end of the index (in the
correct order) and then deleting any duplicated records.


This sorting would be very useful to me, and save a fair bit of running
time.

Andrew

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


Re: Sorting Of Index

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Sorting was added, and is available in the Lucene 1.4.x releases.

	Erik


On Nov 17, 2004, at 8:29 AM, Palmer, Andrew MMI Woking wrote:

>
> Hi,
>
> I have been using Lucene now for about 4 years (pre Jakarta) and the
> system has worked fine.
> One feature that would be nice for my development would be the ability
> to sort the index by a particular field.
>
> There has been a marked performance improvement when the index is 
> sorted
> in the same order I am extracting the Documents.  I do not use a Query
> as some of the selections would not be easy to describe this way.
>
> I have been doing the sort in my current code, but it takes a long time
> as it involves adding the records to the end of the index (in the
> correct order) and then deleting any duplicated records.
>
>
> This sorting would be very useful to me, and save a fair bit of running
> time.
>
> Andrew
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


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


Re: Sorting Of Index

Posted by Paul Elschot <pa...@xs4all.nl>.
On Wednesday 17 November 2004 17:29, Palmer, Andrew MMI Woking wrote:
> 
> Hi,
> 
> I have been using Lucene now for about 4 years (pre Jakarta) and the
> system has worked fine.  
> One feature that would be nice for my development would be the ability
> to sort the index by a particular field.
> 
> There has been a marked performance improvement when the index is sorted
> in the same order I am extracting the Documents.  I do not use a Query
> as some of the selections would not be easy to describe this way.
> 
> I have been doing the sort in my current code, but it takes a long time
> as it involves adding the records to the end of the index (in the
> correct order) and then deleting any duplicated records.
> 
> 
> This sorting would be very useful to me, and save a fair bit of running
> time.

You could also first collect all doc numbers that need to be retrieved,
sort them, and then retrieve your documents in sorted order.

Regards,
Paul


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