Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-1461

Cached filter for a single term field



    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9
    • Component/s: None
    • Labels:
    • Lucene Fields:
      New, Patch Available


      These classes implement inexpensive range filtering over a field containing a single term. They do this by building an integer array of term numbers (storing the term->number mapping in a TreeMap) and then implementing a fast integer comparison based DocSetIdIterator.

      This code is currently being used to do age range filtering, but could also be used to do other date filtering or in any application where there need to be multiple filters based on the same single term field. I have an untested implementation of single term filtering and have considered but not yet implemented term set filtering (useful for location based searches) as well.

      The code here is fairly rough; it works but lacks javadocs and toString() and hashCode() methods etc. I'm posting it here to discover if there is other interest in this feature; I don't mind fixing it up but would hate to go to the effort if it's not going to make it into Lucene.


        1. DisjointMultiFilter.java
          3 kB
          Tim Sturge
        2. FieldCacheRangeFilter.patch
          1 kB
          Tim Sturge
        3. LUCENE-1461.patch
          57 kB
          Uwe Schindler
        4. LUCENE-1461.patch
          57 kB
          Uwe Schindler
        5. LUCENE-1461.patch
          56 kB
          Uwe Schindler
        6. LUCENE-1461.patch
          52 kB
          Uwe Schindler
        7. LUCENE-1461.patch
          38 kB
          Uwe Schindler
        8. LUCENE-1461.patch
          37 kB
          Uwe Schindler
        9. LUCENE-1461.patch
          21 kB
          Uwe Schindler
        10. LUCENE-1461.patch
          26 kB
          Michael McCandless
        11. LUCENE-1461a.patch
          4 kB
          Paul Elschot
        12. LUCENE-1461b.patch
          25 kB
          Tim Sturge
        13. LUCENE-1461c.patch
          18 kB
          Tim Sturge
        14. PerfTest.java
          4 kB
          Uwe Schindler
        15. RangeMultiFilter.java
          3 kB
          Tim Sturge
        16. RangeMultiFilter.java
          2 kB
          Tim Sturge
        17. TermMultiFilter.java
          2 kB
          Tim Sturge
        18. TestFieldCacheRangeFilter.patch
          17 kB
          Tim Sturge

          Issue Links



              • Assignee:
                uschindler Uwe Schindler
                tsturge Tim Sturge
              • Votes:
                1 Vote for this issue
                1 Start watching this issue


                • Created: