Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 68924 invoked from network); 4 Feb 2008 11:37:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2008 11:37:54 -0000 Received: (qmail 48926 invoked by uid 500); 4 Feb 2008 11:37:40 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 48894 invoked by uid 500); 4 Feb 2008 11:37:40 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 48883 invoked by uid 99); 4 Feb 2008 11:37:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2008 03:37:40 -0800 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=DNS_FROM_DOB,HTML_MESSAGE,RCVD_IN_DOB,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Juerg.Meier@ctp-consulting.com designates 213.173.176.198 as permitted sender) Received: from [213.173.176.198] (HELO cronos.ctp-consulting.com) (213.173.176.198) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 04 Feb 2008 11:37:12 +0000 Received: from hermes.ctp-consulting.com (unknown [10.170.128.12]) by cronos.ctp-consulting.com (Postfix) with ESMTP id 2C521A6C0FA for ; Mon, 4 Feb 2008 12:37:18 +0100 (CET) Received: from hermes.ctp.com ([10.170.128.12]) by hermes.ctp.com ([10.170.128.12]) with mapi; Mon, 4 Feb 2008 12:37:51 +0100 From: Juerg Meier To: "java-user@lucene.apache.org" Date: Mon, 4 Feb 2008 12:37:51 +0100 Subject: Random selection of files Thread-Topic: Random selection of files Thread-Index: AQHIZyJfAeOwZFDLa0Ch7NHuUFCang== Message-ID: <2F77E293C046E7469D72240E09A2FB100E782C25@hermes.ctp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_2F77E293C046E7469D72240E09A2FB100E782C25hermesctpcom_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_2F77E293C046E7469D72240E09A2FB100E782C25hermesctpcom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 docu= ments 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 n= eed to retrieve all 1000 docs first, to do a random selection on our own af= terwards? That appears to be quite expensive. Thanks for any hint, -- Juerg --_000_2F77E293C046E7469D72240E09A2FB100E782C25hermesctpcom_--