Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 10300 invoked from network); 4 Feb 2008 07:45:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2008 07:45:35 -0000 Received: (qmail 51294 invoked by uid 500); 4 Feb 2008 07:45:20 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 51249 invoked by uid 500); 4 Feb 2008 07:45:20 -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 51238 invoked by uid 99); 4 Feb 2008 07:45:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Feb 2008 23:45:20 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2008 07:45:00 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4F68E714072 for ; Sun, 3 Feb 2008 23:45:08 -0800 (PST) Message-ID: <25678984.1202111108322.JavaMail.jira@brutus> Date: Sun, 3 Feb 2008 23:45:08 -0800 (PST) From: "Michael Busch (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-584) Decouple Filter from BitSet In-Reply-To: <27200586.1149076109798.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-584?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1256= 5285#action_12565285 ]=20 Michael Busch commented on LUCENE-584: -------------------------------------- {quote} I have attached a patch to CHANGES.txt to explicitly state that filters out= side the lucene code base will need to be adapted. {quote} I added your comment to CHANGES.txt, Paul. Thanks again! > Decouple Filter from BitSet > --------------------------- > > Key: LUCENE-584 > URL: https://issues.apache.org/jira/browse/LUCENE-584 > Project: Lucene - Java > Issue Type: Improvement > Components: Search > Affects Versions: 2.0.1 > Reporter: Peter Sch=C3=A4fer > Assignee: Michael Busch > Priority: Minor > Fix For: 2.4 > > Attachments: bench-diff.txt, bench-diff.txt, CHANGES.txt.patch, C= ontribQueries20080111.patch, lucene-584-take2.patch, lucene-584-take3-part1= .patch, lucene-584-take3-part2.patch, lucene-584-take4-part1.patch, lucene-= 584-take4-part2.patch, lucene-584-take5-part1.patch, lucene-584-take5-part2= .patch, lucene-584.patch, Matcher-20070905-2default.patch, Matcher-20070905= -3core.patch, Matcher-20071122-1ground.patch, Some Matchers.zip, Test200801= 11.patch > > > {code} > package org.apache.lucene.search; > public abstract class Filter implements java.io.Serializable=20 > { > public abstract AbstractBitSet bits(IndexReader reader) throws IOExcept= ion; > } > public interface AbstractBitSet=20 > { > public boolean get(int index); > } > {code} > It would be useful if the method =3DFilter.bits()=3D returned an abstract= interface, instead of =3Djava.util.BitSet=3D. > Use case: there is a very large index, and, depending on the user's privi= leges, only a small portion of the index is actually visible. > Sparsely populated =3Djava.util.BitSet=3Ds are not efficient and waste lo= ts of memory. It would be desirable to have an alternative BitSet implement= ation with smaller memory footprint. > Though it _is_ possibly to derive classes from =3Djava.util.BitSet=3D, it= was obviously not designed for that purpose. > That's why I propose to use an interface instead. The default implementat= ion could still delegate to =3Djava.util.BitSet=3D. --=20 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