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)

        For ridiculously small sets, we'll just use a sorted int[]. maxDoc >>> 6 is a good value if you want to save memory, lower values such as maxDoc >>> 11 should provide faster building but at the expense of using a full bitset even for quite sparse data.

      • 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