org.apache.solr.request

## Class DocValuesFacets

- java.lang.Object
- - org.apache.solr.request.DocValuesFacets

-     public class DocValuesFacets
      extends Object

  Computes term facets for docvalues field (single or multivalued).

  This is basically a specialized case of the code in SimpleFacets. Instead of working on a top-level reader view (binary-search per docid), it collects per-segment, but maps ordinals to global ordinal space using MultiDocValues' OrdinalMap.

  This means the ordinal map is created per-reopen: O(nterms), but this may perform better than PerSegmentSingleValuedFaceting which has to merge O(nterms) per query. Additionally it works for multi-valued fields.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static NamedList<Integer>` | `getCounts(SolrIndexSearcher searcher, DocSet docs, String fieldName, int offset, int limit, int mincount, boolean missing, String sort, String prefix, String contains, boolean ignoreCase, FacetDebugInfo fdebug)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getCounts

          public static NamedList<Integer> getCounts(SolrIndexSearcher searcher,
                                                     DocSet docs,
                                                     String fieldName,
                                                     int offset,
                                                     int limit,
                                                     int mincount,
                                                     boolean missing,
                                                     String sort,
                                                     String prefix,
                                                     String contains,
                                                     boolean ignoreCase,
                                                     FacetDebugInfo fdebug)
                                              throws IOException

      Throws:
        `IOException`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.