lucene-java-user mailing list archives

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

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.


On Feb 4, 2008 11:37 AM, Juerg Meier <> 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
> Thanks for any hint,
> -- Juerg

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message