Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B8D2811BB9 for ; Fri, 6 Jun 2014 22:00:44 +0000 (UTC) Received: (qmail 28910 invoked by uid 500); 6 Jun 2014 22:00:42 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 28837 invoked by uid 500); 6 Jun 2014 22:00:42 -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 28827 invoked by uid 99); 6 Jun 2014 22:00:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2014 22:00:42 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.213.179] (HELO mail-ig0-f179.google.com) (209.85.213.179) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2014 22:00:37 +0000 Received: by mail-ig0-f179.google.com with SMTP id hn18so1397065igb.12 for ; Fri, 06 Jun 2014 15:00:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=xamHLuhPFlOOF4oU4eBtzPcOu628QZ57VZVGj22ToXQ=; b=YfwWvG2johYI/39gdAXNMBP+/gZ2OaM8Ce3k2nt2Mtu87RtfnkuN32/ba0JqmsKyFn 9ebP/MSqjyxMWb0FO2hw9mPbqAp6iuQx9ufOSkACfEV/xjJS6OxnrxZOWIwA8eQzIE46 8nnhcxBkUyLlAqMyVjXhRgxf9zpa4P2w1EUjkq3XwFbjZPjCahTx0UcKsoZg6HoNWBJH 2+W7pXEDJ6pcW8wUFpKcK7vsl4VrQ0hfIJzA3YUgHUsMNhw2Q2QnqaqCNjfRAlDLcM63 uQi4x2K4Ig4H+6YtwpEPYdKUAjUpI/o81NFsjTL1IWcIgFP0MzTjt24DvkHtKVb8DSuy nzcw== X-Gm-Message-State: ALoCoQkeGXlerp0T809xeR4buMFszAQ9F5IRUqZTKcjpHwe/QzHsND13j3pXTILGo7kuRpStk44l X-Received: by 10.43.160.137 with SMTP id mc9mr9873045icc.4.1402092017048; Fri, 06 Jun 2014 15:00:17 -0700 (PDT) Received: from frisbee.local (c-68-63-180-159.hsd1.az.comcast.net. [68.63.180.159]) by mx.google.com with ESMTPSA id u10sm29463558igz.21.2014.06.06.15.00.16 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Jun 2014 15:00:16 -0700 (PDT) Date: Fri, 6 Jun 2014 15:00:13 -0700 (MST) From: Chris Hostetter To: java-user@lucene.apache.org Subject: Re: absence of searchAfter method with Collector parameter in Lucene IndexSearcher In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org : I was wondering why there is no search method in lucene Indexsearcher to : search after last reference by passing collector. Say a method with : signature like searchAfter(Query query, ScoreDoc after, Collector results). searchAfter only makes sense if there is a Sort involved -- either explicitly or implicitly on "score" When you use a Collector, even if your collector produces "ScoreDoc" objects, a subsequent (hypothetical) call searchAfter(Query,ScoreDoc,Collector) would have no idea what the meaning of "after" was for that ScoreDoc. (Even if the ScoreDoc was an instance of FieldDoc that encapsulated the values for the sort fields, it doesn't know what the fieldNames are, or what the comparator/direction to use against those field+values are to know what is "after" them). So from an API standpoint: it just doesn't make any sense. if you want searchAfter functionality along with custom Collector logic, take a look at things like TopFieldCollector.create(...) which you could then wrap in your own Collector. -Hoss http://www.lucidworks.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org