Package 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 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 Description boolean
equals(Object o)
abstract DelegatingCollector
getAnalyticsCollector(ResponseBuilder rb, org.apache.lucene.search.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(org.apache.lucene.search.IndexSearcher searcher)
Returns a DelegatingCollector to be run after the main query and all of its filters, but before any sorting or grouping collectorsint
hashCode()
void
visit(org.apache.lucene.search.QueryVisitor visitor)
-
Methods inherited from class org.apache.solr.search.ExtendedQueryBase
getOptions, getOptionsString, setCache, setCost, toString
-
Methods inherited from class org.apache.lucene.search.Query
classHash, createWeight, rewrite, 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
getCostAppliedQuery, setCache, 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 interfaceExtendedQuery
- Overrides:
getCache
in classExtendedQueryBase
-
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. Otherwise, for smaller costs, this cost will be used forTwoPhaseIterator.matchCost()
.- Specified by:
getCost
in interfaceExtendedQuery
- Overrides:
getCost
in classExtendedQueryBase
-
equals
public boolean equals(Object o)
- Specified by:
equals
in classorg.apache.lucene.search.Query
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classorg.apache.lucene.search.Query
-
getFilterCollector
public DelegatingCollector getFilterCollector(org.apache.lucene.search.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 interfacePostFilter
-
getAnalyticsCollector
public abstract DelegatingCollector getAnalyticsCollector(ResponseBuilder rb, org.apache.lucene.search.IndexSearcher searcher)
-
visit
public void visit(org.apache.lucene.search.QueryVisitor visitor)
- Specified by:
visit
in classorg.apache.lucene.search.Query
-
-