Return-Path: Delivered-To: apmail-lucene-solr-user-archive@locus.apache.org Received: (qmail 53821 invoked from network); 7 Jul 2008 17:16:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jul 2008 17:16:20 -0000 Received: (qmail 16239 invoked by uid 500); 7 Jul 2008 17:16:16 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 16216 invoked by uid 500); 7 Jul 2008 17:16:16 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 16205 invoked by uid 99); 7 Jul 2008 17:16:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jul 2008 10:16:16 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of seanlaval@hotmail.com designates 65.54.246.232 as permitted sender) Received: from [65.54.246.232] (HELO bay0-omc3-s32.bay0.hotmail.com) (65.54.246.232) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jul 2008 17:15:23 +0000 Received: from BAY115-DS1 ([65.54.250.89]) by bay0-omc3-s32.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 7 Jul 2008 10:15:23 -0700 X-Originating-IP: [86.149.187.211] X-Originating-Email: [seanlaval@hotmail.com] Message-ID: From: "Sean Laval" In-Reply-To: To: References: Subject: Re: implementing a random result request handler - solr 1.2 Date: Mon, 7 Jul 2008 18:15:23 +0100 MIME-Version: 1.0 X-Unsent: 1 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 12.0.1606 X-MimeOLE: Produced By Microsoft MimeOLE V12.0.1606 X-OriginalArrivalTime: 07 Jul 2008 17:15:23.0397 (UTC) FILETIME=[0A8DDB50:01C8E055] X-Virus-Checked: Checked by ClamAV on apache.org Well its simply a business requirement from my perspective. I am not sure I can say more than that. I could maybe implement a request handler that did an initial search to work out how many hits there are resulting from the query and then did as many more queries as were required fetching just 1 document starting at a given random number .. would that work? Sounds a bit cludgy to me even as I say it. Sean -------------------------------------------------- From: "Walter Underwood" Sent: Monday, July 07, 2008 5:06 PM To: Subject: Re: implementing a random result request handler - solr 1.2 > Why do you want random hits? If we know more about the bigger > problem, we can probably make better suggestions. > > Fundamentally, Lucene is designed to quickly return the best > hits for a query. Returning random hits from the entire > matched set is likely to be very slow. It just isn't what > Lucene is designed to do. > > wunder > > On 7/7/08 8:58 AM, "Sean Laval" wrote: > >> I have seen various posts about implementing random sorting relating to >> the >> 1.3 code base but I am trying to do this in 1.2. Does anyone have any >> suggestions? The approach I have considered is to implement my own >> request >> handler that picks random documents from a larger result list. I >> therefore >> need to be able to create a DocList and add documents to it but can't >> seem to >> do this. Does anyone have any advice they could offer please? >> >> Regards, >> >> Sean > >