Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 82563 invoked from network); 3 Sep 2008 23:12:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Sep 2008 23:12:41 -0000 Received: (qmail 50900 invoked by uid 500); 3 Sep 2008 23:12:33 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 50859 invoked by uid 500); 3 Sep 2008 23:12:33 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 50850 invoked by uid 99); 3 Sep 2008 23:12:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 16:12:33 -0700 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 23:11:43 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8C24C234C1CA for ; Wed, 3 Sep 2008 16:11:44 -0700 (PDT) Message-ID: <51068842.1220483504573.JavaMail.jira@brutus> Date: Wed, 3 Sep 2008 16:11:44 -0700 (PDT) From: "Doron Cohen (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-1356) Allow easy extensions of TopDocCollector In-Reply-To: <678170568.1218636044559.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628193#action_12628193 ] Doron Cohen commented on LUCENE-1356: ------------------------------------- It is, applies cleanly and seems correct. Will commit as soon as tests complete. > Allow easy extensions of TopDocCollector > ---------------------------------------- > > Key: LUCENE-1356 > URL: https://issues.apache.org/jira/browse/LUCENE-1356 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Reporter: Shai Erera > Assignee: Doron Cohen > Priority: Minor > Fix For: 2.3.3, 2.4 > > Attachments: 1356-2.patch, 1356.patch > > > TopDocCollector's members and constructor are declared either private or package visible. It makes it hard to extend it as if you want to extend it you can reuse its *hq* and *totatlHits* members, but need to define your own. It also forces you to override getTotalHits() and topDocs(). > By changing its members and constructor (the one that accepts a PQ) to protected, we allow users to extend it in order to get a different view of 'top docs' (like TopFieldCollector does), but still enjoy its getTotalHits() and topDocs() method implementations. -- 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: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org