Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 46283 invoked from network); 29 Nov 2010 18:27:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Nov 2010 18:27:36 -0000 Received: (qmail 20864 invoked by uid 500); 29 Nov 2010 18:27:35 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 20811 invoked by uid 500); 29 Nov 2010 18:27:35 -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 20804 invoked by uid 99); 29 Nov 2010 18:27:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Nov 2010 18:27:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Nov 2010 18:27:33 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oATIRBFB001874 for ; Mon, 29 Nov 2010 18:27:11 GMT Message-ID: <23676768.5471291055231314.JavaMail.jira@thor> Date: Mon, 29 Nov 2010 13:27:11 -0500 (EST) From: "Uwe Schindler (JIRA)" To: dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-2784) Change all FilteredTermsEnum impls into TermsEnum decorators In-Reply-To: <32830614.2241291048753198.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-2784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12964867#action_12964867 ] Uwe Schindler commented on LUCENE-2784: --------------------------------------- bq. I also removed multifields usage in these multitermqueries (maybe missed a few, will look more), because all rewrite methods are per-segment. MultiTermQueryWrapperFilter still has it :-) And TermCollectingRewrite does not have it. But I think we should remove that in a separate issue. > Change all FilteredTermsEnum impls into TermsEnum decorators > ------------------------------------------------------------ > > Key: LUCENE-2784 > URL: https://issues.apache.org/jira/browse/LUCENE-2784 > Project: Lucene - Java > Issue Type: Improvement > Reporter: Robert Muir > Assignee: Uwe Schindler > Fix For: 4.0 > > Attachments: LUCENE-2784.patch, LUCENE-2784.patch > > > Currently, FilteredTermsEnum has two ctors: > * FilteredTermsEnum(IndexReader reader, String field) > * FilteredTermsEnum(TermsEnum tenum) > But most of our concrete implementations (e.g. TermsRangeEnum) use the IndexReader+field ctor > In my opinion we should remove this ctor, and switch over all FilteredTermsEnum implementations to just take a TermsEnum. > Advantages: > * This simplifies FilteredTermsEnum and its subclasses, where they are more decorator-like (perhaps in the future we could compose them) > * Removes silly checks such as if (tenum == null) in every next() > * Allows for consumers to pass in enumerators however they want: e.g. its their responsibility if they want to use MultiFields or not, it shouldnt be buried in FilteredTermsEnum. > I created a quick patch (all core+contrib+solr tests pass), but i think this opens up more possibilities for refactoring improvements that haven't yet been done in the patch: we should explore these too. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org