Issue Details (XML | Word | Printable)

Key: LUCENE-584
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Mark Miller
Reporter: Peter Schäfer
Votes: 11
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

Decouple Filter from BitSet

Created: 31/May/06 06:47 PM   Updated: 25/Sep/09 04:23 PM
Return to search
Component/s: Search
Affects Version/s: 2.1
Fix Version/s: 2.9

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works bench-diff.txt 2007-04-08 03:59 AM Doron Cohen 8 kB
Text File Licensed for inclusion in ASF works bench-diff.txt 2007-04-05 09:33 PM Otis Gospodnetic 7 kB
Text File Licensed for inclusion in ASF works CHANGES.txt.patch 2008-02-03 08:57 AM Paul Elschot 0.7 kB
Text File Licensed for inclusion in ASF works ContribQueries20080111.patch 2008-01-11 02:06 PM Paul Elschot 2 kB
Text File Licensed for inclusion in ASF works lucene-584-take2.patch 2007-12-03 05:53 AM Michael Busch 52 kB
Text File Licensed for inclusion in ASF works lucene-584-take3-part1.patch 2008-01-10 08:04 AM Michael Busch 37 kB
Text File Licensed for inclusion in ASF works lucene-584-take3-part2.patch 2008-01-10 08:04 AM Michael Busch 77 kB
Text File Licensed for inclusion in ASF works lucene-584-take4-part1.patch 2008-01-11 08:58 AM Michael Busch 39 kB
Text File Licensed for inclusion in ASF works lucene-584-take4-part2.patch 2008-01-11 08:58 AM Michael Busch 77 kB
Text File Licensed for inclusion in ASF works lucene-584-take5-part1.patch 2008-02-01 03:54 AM Michael Busch 47 kB
Text File Licensed for inclusion in ASF works lucene-584-take5-part2.patch 2008-02-01 03:54 AM Michael Busch 76 kB
Text File Licensed for inclusion in ASF works lucene-584.patch 2007-11-28 09:25 AM Michael Busch 34 kB
Text File Licensed for inclusion in ASF works Matcher-20070905-2default.patch 2007-09-05 09:27 PM Paul Elschot 75 kB
Text File Licensed for inclusion in ASF works Matcher-20070905-3core.patch 2007-09-05 09:27 PM Paul Elschot 18 kB
Text File Licensed for inclusion in ASF works Matcher-20071122-1ground.patch 2007-11-22 06:33 PM Paul Elschot 32 kB
Zip Archive Licensed for inclusion in ASF works Some Matchers.zip 2006-09-04 09:02 PM Eks Dev 9 kB
Text File Licensed for inclusion in ASF works Test20080111.patch 2008-01-11 08:48 PM Paul Elschot 6 kB
Issue Links:
Reference
 

Resolution Date: 22/Aug/09 09:18 PM


 Description  « Hide
package org.apache.lucene.search;

public abstract class Filter implements java.io.Serializable 
{
  public abstract AbstractBitSet bits(IndexReader reader) throws IOException;
}

public interface AbstractBitSet 
{
  public boolean get(int index);
}

It would be useful if the method =Filter.bits()= returned an abstract interface, instead of =java.util.BitSet=.

Use case: there is a very large index, and, depending on the user's privileges, only a small portion of the index is actually visible.
Sparsely populated =java.util.BitSet=s are not efficient and waste lots of memory. It would be desirable to have an alternative BitSet implementation with smaller memory footprint.

Though it is possibly to derive classes from =java.util.BitSet=, it was obviously not designed for that purpose.
That's why I propose to use an interface instead. The default implementation could still delegate to =java.util.BitSet=.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.