lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Carlson <carl...@bookandhammer.com>
Subject Re: Alphabetical sorting of results
Date Thu, 31 Oct 2002 15:26:47 GMT
Hi Eoin,

In the contributions area, there is a project called SearchBean which 
will handle most of the sorting issues for you. It does a full scan at 
startup (for 100K doc about 5-10 seconds) and stores the field to be 
sorted in an array. Then it can get access to the sorted field value 
much faster then hits.get(i).

I hope this helps

--Peter


On Thursday, October 31, 2002, at 05:54 AM, Eoin O'Toole wrote:

> I am indexing documents (about 7 different document types) and must 
> display the results alphabetically by title field... which is 
> generally not one of the search fields.
>
> Currently I am calling hits.get(i) on each document to find the title, 
> and then sorting by title. Sort is fast, but calling hits.get(i)  n 
> times is too slow beyond about 400 objects... and this approach means 
> I have to do a "full scan" of the Hits collection.
>
> Anyone have any suggestions/strategies on solving this? (Or is there 
> functionality already in place I have overlooked?)
>
> Thanks for any input,
>
> Eoin
>
>
> --
> To unsubscribe, e-mail:   
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:lucene-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message