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 E7664D004 for ; Thu, 1 Nov 2012 20:56:20 +0000 (UTC) Received: (qmail 97213 invoked by uid 500); 1 Nov 2012 20:56:19 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 97149 invoked by uid 500); 1 Nov 2012 20:56:19 -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 97141 invoked by uid 99); 1 Nov 2012 20:56:19 -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 20:56:19 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of uwe@thetaphi.de designates 188.138.97.18 as permitted sender) Received: from [188.138.97.18] (HELO mail.sd-datasolutions.de) (188.138.97.18) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2012 20:56:12 +0000 Received: from VEGA (port-92-196-126-162.dynamic.qsc.de [92.196.126.162]) by mail.sd-datasolutions.de (Postfix) with ESMTPSA id 68B5F14AA079; Thu, 1 Nov 2012 20:55:51 +0000 (UTC) From: "Uwe Schindler" To: , References: In-Reply-To: Subject: RE: [DISCUSS] Merge DocsEnum and DocsAndPositionsEnum into PostingsEnum Date: Thu, 1 Nov 2012 21:55:51 +0100 Message-ID: <003d01cdb873$473507e0$d59f17a0$@thetaphi.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIve6r4BdLI0YbN2HBPpWOjC7bUrZcR7ksQ Content-Language: de X-Virus-Checked: Checked by ClamAV on apache.org +1, I think PostingsEnum ist he much better idea! I was thinking about = that several times. In fact DocsEnum is just a specialized = DocIdSetIterator, so I never understood the difference in the early = Lucene 4 days. Now we have some extra methods, but most of them are = optional and a PostingsEnum extends DocIdSetIterator (I would like to = have *implements* more...) is perfectly 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 lots of cases (like simple = Filters). A filter for a Term could directly return the PostingsEnum for = this term in getDocIdSet()... Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de > -----Original Message----- > From: Simon Willnauer [mailto:simon.willnauer@gmail.com] > Sent: Thursday, November 01, 2012 9:26 PM > To: dev@lucene.apache.org > Subject: [DISCUSS] Merge DocsEnum and DocsAndPositionsEnum into > PostingsEnum >=20 > hey folks, >=20 > I have spend a hell lot of time on the positions branch to make = positions and > offsets working on all queries if needed. The one thing that bugged me = the > most is the distinction between DocsEnum and DocsAndPositionsEnum. > Really when you look at it closer DocsEnum is a DocsAndFreqsEnum and = if we > omit Freqs we should return a DocIdSetIter. > Same is true for > DocsAndPostionsAndPayloadsAndOffsets*YourFancyFeatureHere*Enum. I > don't really see the benefits from this. We should rather make the = interface > simple and call it something like PostingsEnum where you have to = specify > flags on the TermsIterator and if we can't provide the sufficient enum = we > throw an exception? > I just want to bring up the idea here since it might simplify a lot = for users as > well for us when improving our positions / offset etc. > support. >=20 > thoughts? Ideas? >=20 > simon >=20 > --------------------------------------------------------------------- > 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