Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-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 E3B6BD06F for ; Thu, 1 Nov 2012 21:05:04 +0000 (UTC) Received: (qmail 22933 invoked by uid 500); 1 Nov 2012 21:05:03 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 22868 invoked by uid 500); 1 Nov 2012 21:05:03 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 22861 invoked by uid 99); 1 Nov 2012 21:05:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2012 21:05:03 +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: domain of rcmuir@gmail.com designates 209.85.216.176 as permitted sender) Received: from [209.85.216.176] (HELO mail-qc0-f176.google.com) (209.85.216.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2012 21:04:59 +0000 Received: by mail-qc0-f176.google.com with SMTP id n41so2302922qco.35 for ; Thu, 01 Nov 2012 14:04:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=CpxQeBp6QFHZh/FRf8royvaxURaGK+RW010VRgNGWIA=; b=MDrbswVi5EoOxbOoaGpXCiQ3X0V0XLfrmbq/tLbw6XpsmJzkr6YfaNJPAtdumYWWY0 Jx/Ynck3uLLFMYKaEKSRT60anLPs60RiPWYykhkVplE5aApRNa1NdS3eiNrvCKwbORws fbrCr0t3e1EkRwARp9VJDqIeStuugwvOtQtgyI3xepVmHrRfWOdBK44mKnSFsSSirp6e Cpj5SpEA2DZPhGuO0OmWgCWAffEHA8ywgi9Yg4gE9MjJ2xDHLeBS94E5Pxp5c856d8Wu HHzkO+6DTLYvOd6BUJIkRu9HyJ0l1m9SyiIpGnpt0Pyp1BZIwdkaGElkiML/lBu14KJh +AMw== Received: by 10.224.201.136 with SMTP id fa8mr28833978qab.28.1351803878810; Thu, 01 Nov 2012 14:04:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.49.105.168 with HTTP; Thu, 1 Nov 2012 14:04:18 -0700 (PDT) In-Reply-To: <003d01cdb873$473507e0$d59f17a0$@thetaphi.de> References: <003d01cdb873$473507e0$d59f17a0$@thetaphi.de> From: Robert Muir Date: Thu, 1 Nov 2012 17:04:18 -0400 Message-ID: Subject: Re: [DISCUSS] Merge DocsEnum and DocsAndPositionsEnum into PostingsEnum To: dev@lucene.apache.org Cc: simon.willnauer@gmail.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Nov 1, 2012 at 4:55 PM, Uwe Schindler wrote: > +1, I think PostingsEnum ist he much better idea! I was thinking about th= at several times. In fact DocsEnum is just a specialized DocIdSetIterator, = so I never understood the difference in the early Lucene 4 days. Now we hav= e some extra methods, but most of them are optional and a PostingsEnum exte= nds DocIdSetIterator (I would like to have *implements* more...) is perfect= ly fine for all those use cases. And as both Scorer and PostingsEnum extend= the same base class, this makes code reuseable and looking identical in lo= ts of cases (like simple Filters). A filter for a Term could directly retur= n the PostingsEnum for this term in getDocIdSet()... > I was frustrated with some of the same things as simon, and thought about the 'implements' too. (i actually went so far as to make a quick prototype patch to see what it look like: http://pastebin.com/vum1mx9H). I don't like that if you write a codec, you must write duplicate enums and cannot have e.g. your positional enum extend your docs one and so forth. I also think it limits us for the Scorer case (it extends DocsEnum now, but what if you wanted a Scorer where you could walk its positions...) But anyway I think I like Simon's idea (we can deal with the interface idea separately). --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org