org.apache.solr.search

## Class AnalyticsQuery

- java.lang.Object
- - org.apache.lucene.search.Query
  - - org.apache.solr.search.ExtendedQueryBase
    - - org.apache.solr.search.AnalyticsQuery

- All Implemented Interfaces:
    ExtendedQuery, PostFilter

      public abstract class AnalyticsQuery
      extends ExtendedQueryBase
      implements PostFilter

  Note: This API is experimental and may change in non backward-compatible ways in the future

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnalyticsQuery()` Use this constructor for single node analytics.
    `AnalyticsQuery(MergeStrategy mergeStrategy)` Use this constructor for distributed analytics.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `abstract DelegatingCollector` | `getAnalyticsCollector(ResponseBuilder rb, IndexSearcher searcher)`
    `boolean` | `getCache()` Should this query be cached in the query cache or filter cache.
    `int` | `getCost()` Returns the cost of this query, used to order checking of filters that are not cached.
    `DelegatingCollector` | `getFilterCollector(IndexSearcher searcher)` Returns a DelegatingCollector to be run after the main query and all of its filters, but before any sorting or grouping collectors
    `int` | `hashCode()`

    - ### Methods inherited from class org.apache.solr.search.ExtendedQueryBase

      `getCacheSep, getOptions, getOptionsString, setCache, setCacheSep, setCost, toString`

    - ### Methods inherited from class org.apache.lucene.search.Query

      `classHash, createWeight, rewrite, sameClassAs, toString`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.solr.search.ExtendedQuery

      `getCacheSep, setCache, setCacheSep, setCost`

- - ### Constructor Detail

    - #### AnalyticsQuery

          public AnalyticsQuery()

      Use this constructor for single node analytics.

    - #### AnalyticsQuery

          public AnalyticsQuery(MergeStrategy mergeStrategy)

      Use this constructor for distributed analytics.
      Parameters:
        `mergeStrategy` - defines the distributed merge strategy for this AnalyticsQuery

  - ### Method Detail

    - #### getCache

          public boolean getCache()

      Description copied from interface: `ExtendedQuery`
      Should this query be cached in the query cache or filter cache.
      Specified by:
        `getCache` in interface `ExtendedQuery`
      Overrides:
        `getCache` in class `ExtendedQueryBase`

    - #### getCost

          public int getCost()

      Description copied from interface: `ExtendedQuery`
      Returns the cost of this query, used to order checking of filters that are not cached. If getCache()==false && getCost()>=100 && this instanceof PostFilter, then the PostFilter interface will be used for filtering.
      Specified by:
        `getCost` in interface `ExtendedQuery`
      Overrides:
        `getCost` in class `ExtendedQueryBase`

    - #### equals

          public boolean equals(Object o)

      Specified by:
        `equals` in class `Query`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in class `Query`

    - #### getFilterCollector

          public DelegatingCollector getFilterCollector(IndexSearcher searcher)

      Description copied from interface: `PostFilter`
      Returns a DelegatingCollector to be run after the main query and all of its filters, but before any sorting or grouping collectors
      Specified by:
        `getFilterCollector` in interface `PostFilter`

    - #### getAnalyticsCollector

          public abstract DelegatingCollector getAnalyticsCollector(ResponseBuilder rb,
                                                                    IndexSearcher searcher)

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