org.apache.solr.search.stats

## Class StatsSource

- java.lang.Object
- - org.apache.solr.search.stats.StatsSource

- Direct Known Subclasses:
    ExactStatsCache.ExactStatsSource, LocalStatsSource

      public abstract class StatsSource
      extends Object

  The purpose of this class is only to provide two pieces of information necessary to create `Weight` from a `Query`, that is `TermStatistics` for a term and `CollectionStatistics` for the whole collection.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StatsSource()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract CollectionStatistics` | `collectionStatistics(SolrIndexSearcher localSearcher, String field)`
    `abstract TermStatistics` | `termStatistics(SolrIndexSearcher localSearcher, Term term, TermContext context)`

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

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

- - ### Constructor Detail

    - #### StatsSource

          public StatsSource()

  - ### Method Detail

    - #### termStatistics

          public abstract TermStatistics termStatistics(SolrIndexSearcher localSearcher,
                                                        Term term,
                                                        TermContext context)
                                                 throws IOException

      Throws:
        `IOException`

    - #### collectionStatistics

          public abstract CollectionStatistics collectionStatistics(SolrIndexSearcher localSearcher,
                                                                    String field)
                                                             throws IOException

      Throws:
        `IOException`

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