lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Lea" <ian....@gmail.com>
Subject Re: Random selection of files
Date Mon, 04 Feb 2008 11:42:50 GMT
Hi


I think you would need to do the search to get list of 1000 doc ids,
but wouldn't need to retrieve all 1000.  Just pick your random 10 from
the list and retrieve them.


--
Ian.
ian.lea@gmail.com


On Feb 4, 2008 11:37 AM, Juerg Meier <Juerg.Meier@ctp-consulting.com> wrote:
> Hi,
>
> We have the requirement for an "i'm feeling lucky" button, at least sort of. Whereas
google just delivers the first record in a result set, we should deliver 10 arbitrary hits
chosen out of, let's say, 1000. All of these documents have the same importance i.e. have
the same weight.
>
> So, is there an elegant way with the Lucene API to achieve this? Or do we need to retrieve
all 1000 docs first, to do a random selection on our own afterwards? That appears to be quite
expensive.
>
> Thanks for any hint,
> -- Juerg
>

---------------------------------------------------------------------
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