Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 76534 invoked from network); 10 Aug 2007 07:45:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Aug 2007 07:45:38 -0000 Received: (qmail 47200 invoked by uid 500); 10 Aug 2007 07:45:35 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 47156 invoked by uid 500); 10 Aug 2007 07:45:35 -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 47145 invoked by uid 99); 10 Aug 2007 07:45:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Aug 2007 00:45:35 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [194.109.24.26] (HELO smtp-vbr6.xs4all.nl) (194.109.24.26) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Aug 2007 07:45:32 +0000 Received: from k8l.lan (porta.xs4all.nl [80.127.24.69]) by smtp-vbr6.xs4all.nl (8.13.8/8.13.8) with ESMTP id l7A7jA5c071034 for ; Fri, 10 Aug 2007 09:45:10 +0200 (CEST) (envelope-from paul.elschot@xs4all.nl) From: Paul Elschot To: java-dev@lucene.apache.org Subject: Fwd: Decouple Filter from BitSet: API change and xml query parser Date: Fri, 10 Aug 2007 09:45:09 +0200 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200708100945.09724.paul.elschot@xs4all.nl> X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Checked: Checked by ClamAV on apache.org Taking this to java-dev only. As I said at the jira issue, I'd like to have all test cases pass again, and I'm not happy with the current version of the patch to the xml query=20 parser either. Some test cases currently fail maybe because they use RMI and the new version of Filter does serialize well because the result of getMatcher() is not serializable. It should be possible to fix this by moving Filter to BitSetFilter in these= =20 cases, see also below. The problem is that I don't know how to do this because I have never used java RMI myself. Could someone give me a clue as to why the test case TestRemoteCachingWrapperFilter fails with the patch applied? As for the API change, how to move from the current: public class Filter { abstract public BitSet bits(IndexReader);=20 } to: public class Filter { abstract public Matcher getMatcher(IndexReader);=20 } The patch proposes to do this by moving all current use of Filter to BitSetFilter: public class BitSetFilter extends Filter { abstract public BitSet bits(IndexReader);=20 } Would it be good to have an intermediate version of Filter like this one: public class Filter { /** deprecated, use class BitSetFilter instead */ public BitSet bits(IndexReader); {return null;} abstract public Matcher getMatcher(IndexReader);=20 } =46inally, are DocIdSet and DocIdSetIterator currently part of Lucene? I don't know how to go about these. Regards, Paul Elschot =2D--------- Forwarded Message ---------- Subject: [jira] Commented: (LUCENE-584) Decouple Filter from BitSet Date: Friday 10 August 2007 01:15 =46rom: "Mark Harwood (JIRA)" To: java-dev@lucene.apache.org =20 [ https://issues.apache.org/jira/browse/LUCENE-584?page=3Dcom.atlassian.jir= a.plugin.system.issuetabpanels:comment-tabpanel#action_12518868 ]=20 Mark Harwood commented on LUCENE-584: =2D------------------------------------ OK, I appreciate caching may not be a top priority in this proposal but I h= ave=20 live systems in production using XMLQueryParser and which use the existing= =20 core facilities for caching. As it stands this proposal breaks this=20 functionality (see "FIXME" in contrib's CachedFilterBuilder and my concerns= =20 over use of unthreadsafe Matcher in the core class CachingWrapperFilter) I am obviously concerned by this and keen to help shape a solution which=20 preserves the existing capabilities while adding your new functionality. I'= m=20 not sure I share your view that support for caching can be treated as a=20 separate issue to be dealt with at a later date. There are a larger number = of=20 changes proposed in this patch and if the design does not at least consider= =20 future caching issues now, I suspect much will have to be reworked later. T= he=20 change I can envisage most clearly is expressed in my concern that the=20 DocIdSet and DocIdSetIterator services I outlined are being combined in=20 Matcher as it stands now and these functions will have to be separated. Cheers Mark > 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 > Priority: Minor > Attachments: bench-diff.txt, bench-diff.txt,=20 Matcher1-ground-20070730.patch, Matcher2-default-20070730.patch,=20 Matcher3-core-20070730.patch, Matcher4-contrib-misc-20070730.patch,=20 Matcher5-contrib-queries-20070730.patch, Matcher6-contrib-xml-20070730.patc= h,=20 Some Matchers.zip > > > {code} > package org.apache.lucene.search; > public abstract class Filter implements java.io.Serializable=20 > { > public abstract AbstractBitSet bits(IndexReader reader) throws=20 IOException; > } > public interface AbstractBitSet=20 > { > public boolean get(int index); > } > {code} > It would be useful if the method =3DFilter.bits()=3D returned an abstract= =20 interface, instead of =3Djava.util.BitSet=3D. > Use case: there is a very large index, and, depending on the user's=20 privileges, only a small portion of the index is actually visible. > Sparsely populated =3Djava.util.BitSet=3Ds are not efficient and waste lo= ts of=20 memory. It would be desirable to have an alternative BitSet implementation= =20 with smaller memory footprint. > Though it _is_ possibly to derive classes from =3Djava.util.BitSet=3D, it= was=20 obviously not designed for that purpose. > That's why I propose to use an interface instead. The default implementat= ion=20 could still delegate to =3Djava.util.BitSet=3D. =2D-=20 This message is automatically generated by JIRA. =2D You can reply to this email to add a comment to the issue online. =2D-------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org =46or additional commands, e-mail: java-dev-help@lucene.apache.org =2D------------------------------------------------------ --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org