Class DocSetUtil


  • public class DocSetUtil
    extends Object
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Constructor Detail

      • DocSetUtil

        public DocSetUtil()
    • Method Detail

      • smallSetSize

        public static int smallSetSize​(int maxDoc)
        The cut-off point for small sets (SortedIntDocSet) vs large sets (BitDocSet)
      • equals

        public static boolean equals​(DocSet a,
                                     DocSet b)
        Iterates DocSets to test for equality - slow and for testing purposes only.
        NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
      • getDocSet

        public static DocSet getDocSet​(DocSetCollector collector,
                                       SolrIndexSearcher searcher)
        This variant of getDocSet will attempt to do some deduplication on certain DocSets such as DocSets that match numDocs. This means it can return a cached version of the set, and the returned set should not be modified.
        WARNING: This API is experimental and might change in incompatible ways in the next release.
      • getDocSet

        public static DocSet getDocSet​(DocSet docs,
                                       SolrIndexSearcher searcher)
        This variant of getDocSet maps all sets with size numDocs to searcher.getLiveDocs. The returned set should not be modified.
        WARNING: This API is experimental and might change in incompatible ways in the next release.
      • collectSortedDocSet

        public static void collectSortedDocSet​(DocSet docs,
                                               org.apache.lucene.index.IndexReader reader,
                                               org.apache.lucene.search.Collector collector)
                                        throws IOException
        Throws:
        IOException