Return-Path: X-Original-To: apmail-incubator-lucy-dev-archive@www.apache.org Delivered-To: apmail-incubator-lucy-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A79F9646 for ; Fri, 23 Mar 2012 18:48:41 +0000 (UTC) Received: (qmail 3899 invoked by uid 500); 23 Mar 2012 18:48:41 -0000 Delivered-To: apmail-incubator-lucy-dev-archive@incubator.apache.org Received: (qmail 3864 invoked by uid 500); 23 Mar 2012 18:48:41 -0000 Mailing-List: contact lucy-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucy-dev@incubator.apache.org Delivered-To: mailing list lucy-dev@incubator.apache.org Received: (qmail 3851 invoked by uid 99); 23 Mar 2012 18:48:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Mar 2012 18:48:41 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of loganbell@gmail.com designates 209.85.213.175 as permitted sender) Received: from [209.85.213.175] (HELO mail-yx0-f175.google.com) (209.85.213.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Mar 2012 18:48:35 +0000 Received: by yenm3 with SMTP id m3so3010181yen.6 for ; Fri, 23 Mar 2012 11:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ol/oNY76nzyI5LL3q4CDGwWQJL4oO2PCG7ulmdERa+I=; b=nBR7vo9cwqGVFuTi/G5kP4yk/fUrCicUI7de4tGVi1N18nhD4/GUTKk5dE9BdGEuW9 q2Pwhs5ftdhyRlYQZED/Ff8H9cGKHe3V75bzkA1E7/0O7ILKCNkSrOA4tjTqWIy6SroP eskU9mkmOSSBcCKEapfdqV74oarRSkwGUCZs06OP/vNIZ0HRq7q787cJGVA97q91MfXD QB6/+5RyyuEIpxi5P/KDtiKbP0xyMfA+GL7Rlta0+swohL18F06OmZ5QKn6sJukPnMIS gV185/U5QZBPVdCNT/TYcQEwGDMsIA42coAwr7j5HNWzNYASDnU5DdVoPwU1ucUj0XCV V2qg== MIME-Version: 1.0 Received: by 10.68.136.10 with SMTP id pw10mr31646640pbb.134.1332528494162; Fri, 23 Mar 2012 11:48:14 -0700 (PDT) Received: by 10.68.30.106 with HTTP; Fri, 23 Mar 2012 11:48:14 -0700 (PDT) In-Reply-To: <4F5884E1.1020905@aevum.de> References: <4F5884E1.1020905@aevum.de> Date: Fri, 23 Mar 2012 11:48:14 -0700 Message-ID: From: Logan Bell To: lucy-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=047d7b15ae338c32e904bbed77e0 X-Virus-Checked: Checked by ClamAV on apache.org Subject: [lucy-dev] Fwd: [lucy-user] num_wanted = $infinity? --047d7b15ae338c32e904bbed77e0 Content-Type: text/plain; charset=ISO-8859-1 Would anyone be opposed if I fleshed out the documentation around the following links to explain a couple patterns that his e-mail chain reminded me of when I first started Lucy? The documents in question are: http://incubator.apache.org/lucy/docs/perl/Lucy/Search/IndexSearcher.html http://incubator.apache.org/lucy/docs/perl/Lucy/Docs/Tutorial/BeyondSimple.html It's not clear how to obtain all documents associated with a query and that the num_wanted value defaulted to 10. I would like to give an example of how one might get all results and also update the IndexSearcher documentation to mention that num_wanted is defaulted to 10 (with an offset of 0). I think this is outlined with the Lucy::Simple documentation, but some people don't bother looking at Lucy::Simple and just go directly to using the various Lucy objects. I think by Nick's suggestion the way to get all documents would be something like the following ( feel free to correct me ): my $doc_count = $searcher->doc_max; my $hits = $searcher->hits( # returns a Hits object, not a hit count query => 'foo', num_wanted => $doc_count, ); Open to other comments/suggestions as well. Thanks, Logan ---------- Forwarded message ---------- From: Nick Wellnhofer Date: Thu, Mar 8, 2012 at 2:07 AM Subject: Re: [lucy-user] num_wanted = $infinity? To: lucy-user@incubator.apache.org Using $searcher->doc_max should do the trick. Nick On 08/03/2012 04:08, Jason McIntosh wrote: > Howdy, > > Is there a way to tell the searcher that I want to see *all* hits from a > query at once, unbounded by neither offset nor num_wanted parameters? > Unless I'm misreading things, if you don't define num_wanted at all, it > defaults to 10 anyway. > > Yes, this desire is borne of a stopgap measure until I throw proper > results-paging into my project. But, I'm still curious. (For the nonce I've > just set num_wanted to a large number.) > > --047d7b15ae338c32e904bbed77e0--