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 CEF33D27B for ; Thu, 1 Nov 2012 22:01:42 +0000 (UTC) Received: (qmail 21764 invoked by uid 500); 1 Nov 2012 22:01:41 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 21706 invoked by uid 500); 1 Nov 2012 22:01:41 -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 21699 invoked by uid 99); 1 Nov 2012 22:01:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2012 22:01:41 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.220.48] (HELO mail-pa0-f48.google.com) (209.85.220.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2012 22:01:35 +0000 Received: by mail-pa0-f48.google.com with SMTP id kp12so2107759pab.35 for ; Thu, 01 Nov 2012 15:01:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding:x-gm-message-state; bh=BJ/j7CwvN1OK5lELRY0Pm6tjX+XnDzjIEV+Bjc9VIp8=; b=U6wCaQsnQFO19cljUB0zg59mCX7edDlWgUYvsJzbNuBDAdEir3CXOOid1EiZdXYmgk /qghyUKwHtjNiA5qcUNHyuXeTwgS+oEjp29YFJRLNdW+0wEBbuljpoCSVbp/QccEIETl ePRm6n1Y6BzHwRg0fr0oeDNpUwuzaWhjWhHeHG4mhxsYUxMTLsKtfB/rfQV5zqOdZb7K e2Tq8+Q/hzfpl20sKXsbDYFju4m844QXtY8bCVPrkCHgNibwHoTzr8lp5FCaQLYOjLGe WirYYf9SqRpr0Ws8Vyd9hR+TZN/xEgL2BXTjwThZ2K5+L3T6x9LfLhaEPKyGQJYZ4jQl D4sA== Received: by 10.68.244.135 with SMTP id xg7mr18290702pbc.87.1351807274694; Thu, 01 Nov 2012 15:01:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.240.104 with HTTP; Thu, 1 Nov 2012 15:00:54 -0700 (PDT) In-Reply-To: References: <003d01cdb873$473507e0$d59f17a0$@thetaphi.de> From: Michael McCandless Date: Thu, 1 Nov 2012 18:00:54 -0400 Message-ID: Subject: Re: [DISCUSS] Merge DocsEnum and DocsAndPositionsEnum into PostingsEnum To: dev@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQm0dcH14czEa/ir4g0YKfkVaeJ+C7DNLQT2KBV16G1c+REn0GFcs+Mb3Z0gc6ZlvX1K3U9A X-Virus-Checked: Checked by ClamAV on apache.org +1, this makes total sense! Mike McCandless http://blog.mikemccandless.com On Thu, Nov 1, 2012 at 5:04 PM, Robert Muir wrote: > 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 t= hat several times. In fact DocsEnum is just a specialized DocIdSetIterator,= so I never understood the difference in the early Lucene 4 days. Now we ha= ve some extra methods, but most of them are optional and a PostingsEnum ext= ends DocIdSetIterator (I would like to have *implements* more...) is perfec= tly fine for all those use cases. And as both Scorer and PostingsEnum exten= d the same base class, this makes code reuseable and looking identical in l= ots of cases (like simple Filters). A filter for a Term could directly retu= rn 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org