Class BitsFromQuery

java.lang.Object
com.github.oeuvres.alix.lucene.search.BitsFromQuery

public class BitsFromQuery extends Object
A search giving results as bits. Code from QueryBitSetProducer.java https://github.com/apache/lucene/blob/main/lucene/join/src/java/org/apache/lucene/search/join/QueryBitSetProducer.java Rely on the default LRU lucene cache, instead of an hard cache.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BitsFromQuery(org.apache.lucene.search.Query query)
    Wraps another search's to get bits by LeafReaderContext.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.lucene.util.BitSet
    bits(org.apache.lucene.index.LeafReaderContext context)
    Method called on a leaf of a lucene reader to collect docId hits as a BitSet.
    boolean
     
    org.apache.lucene.search.Query
    Returns the contained search.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BitsFromQuery

      public BitsFromQuery(org.apache.lucene.search.Query query)
      Wraps another search's to get bits by LeafReaderContext.
      Parameters:
      query - Query to cache results of.
  • Method Details

    • getQuery

      public org.apache.lucene.search.Query getQuery()
      Returns the contained search.
      Returns:
      the contained search.
    • bits

      public org.apache.lucene.util.BitSet bits(org.apache.lucene.index.LeafReaderContext context) throws IOException
      Method called on a leaf of a lucene reader to collect docId hits as a BitSet.
      Parameters:
      context - A leaf of a lucene index.
      Returns:
      BitSet of docId found.
      Throws:
      IOException - Lucene errors.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object