Class TermsSliceQuery


  • public final class TermsSliceQuery
    extends SliceQuery
    A SliceQuery that uses the terms dictionary of a field to do the slicing. NOTE: The cost of this filter is O(N*M) where N is the number of unique terms in the dictionary and M is the average number of documents per term. For each segment this filter enumerates the terms dictionary, computes the hash code for each term and fills a bit set with the documents of all terms whose hash code matches the predicate. NOTE: Documents with no value for that field are ignored.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int SEED  
    • Constructor Summary

      Constructors 
      Constructor Description
      TermsSliceQuery​(java.lang.String field, int id, int max)  
    • Method Summary

      Modifier and Type Method Description
      org.apache.lucene.search.Weight createWeight​(org.apache.lucene.search.IndexSearcher searcher, boolean needsScores, float boost)  
      • Methods inherited from class org.apache.lucene.search.Query

        classHash, rewrite, sameClassAs, toString
      • Methods inherited from class java.lang.Object

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

      • TermsSliceQuery

        public TermsSliceQuery​(java.lang.String field,
                               int id,
                               int max)
    • Method Detail

      • createWeight

        public org.apache.lucene.search.Weight createWeight​(org.apache.lucene.search.IndexSearcher searcher,
                                                            boolean needsScores,
                                                            float boost)
                                                     throws java.io.IOException
        Overrides:
        createWeight in class org.apache.lucene.search.Query
        Throws:
        java.io.IOException