Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.9
    • Component/s: core/search
    • Labels:
      None

      Description

      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=.

        Attachments

        1. CHANGES.txt.patch
          0.7 kB
          Paul Elschot
        2. lucene-584-take5-part2.patch
          76 kB
          Michael Busch
        3. lucene-584-take5-part1.patch
          47 kB
          Michael Busch
        4. Test20080111.patch
          6 kB
          Paul Elschot
        5. ContribQueries20080111.patch
          2 kB
          Paul Elschot
        6. lucene-584-take4-part2.patch
          77 kB
          Michael Busch
        7. lucene-584-take4-part1.patch
          39 kB
          Michael Busch
        8. lucene-584-take3-part2.patch
          77 kB
          Michael Busch
        9. lucene-584-take3-part1.patch
          37 kB
          Michael Busch
        10. lucene-584-take2.patch
          52 kB
          Michael Busch
        11. lucene-584.patch
          34 kB
          Michael Busch
        12. Matcher-20071122-1ground.patch
          32 kB
          Paul Elschot
        13. Matcher-20070905-3core.patch
          18 kB
          Paul Elschot
        14. Matcher-20070905-2default.patch
          75 kB
          Paul Elschot
        15. bench-diff.txt
          8 kB
          Doron Cohen
        16. bench-diff.txt
          7 kB
          Otis Gospodnetic
        17. Some Matchers.zip
          9 kB
          Eks Dev

          Issue Links

            Activity

              People

              • Assignee:
                markrmiller@gmail.com Mark Miller
                Reporter:
                nightrider Peter Schäfer
              • Votes:
                11 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: