lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathieu Lecarme <math...@garambrogne.net>
Subject Re: Several questions about scoring/sorting + random sorting in an image/related application
Date Fri, 15 Jun 2007 16:02:05 GMT
You sort only "collection", wich are 300.

first step, you search query with lucene
Map<Integer, Collection> collecs wich come from any persisted stuff.
Collection implement Sortable.
Set bags = new HashSet<Collection>();
iterate over hit
bags.add(collecs.get(hit.getTheIdOfTheCollection));

you've got a bag with at most 300 elements
you can sort it with strange rules.

M.

Antoine Baudoux a écrit :
> The problem is that i want lucene to do the sorting, because the query
> qould return thousands of results, and I'm displaying documents one
> page at a time.
>
>
> On 15 Jun 2007, at 17:42, Mathieu Lecarme wrote:
>
>> First step is to feed a Set with "collection"
>> Second step is to sort it.
>>
>> With a sortedSet, you can do that, isnt'it?
>>
>> M.
>>


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


Mime
View raw message