Class QueryElevationComponent.MapElevationProvider
- java.lang.Object
-
- org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider
-
- All Implemented Interfaces:
QueryElevationComponent.ElevationProvider
- Enclosing class:
- QueryElevationComponent
protected class QueryElevationComponent.MapElevationProvider extends Object implements QueryElevationComponent.ElevationProvider
Simple query exact matchQueryElevationComponent.ElevationProvider.It does not support subset matching (see
QueryElevationComponent.parseMatchPolicy(String)).Immutable.
-
-
Constructor Summary
Constructors Constructor Description MapElevationProvider(Map<QueryElevationComponent.ElevatingQuery,QueryElevationComponent.ElevationBuilder> elevationBuilderMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryElevationComponent.ElevationgetElevationForQuery(String queryString)Gets the elevation associated to the provided query.intsize()Gets the number of query elevations in thisQueryElevationComponent.ElevationProvider.
-
-
-
Constructor Detail
-
MapElevationProvider
public MapElevationProvider(Map<QueryElevationComponent.ElevatingQuery,QueryElevationComponent.ElevationBuilder> elevationBuilderMap)
-
-
Method Detail
-
getElevationForQuery
public QueryElevationComponent.Elevation getElevationForQuery(String queryString)
Description copied from interface:QueryElevationComponent.ElevationProviderGets the elevation associated to the provided query.By contract and by design, only one elevation may be associated to a given query (this can be safely verified by an assertion).
- Specified by:
getElevationForQueryin interfaceQueryElevationComponent.ElevationProvider- Parameters:
queryString- The query string (notanalyzedyet, thisQueryElevationComponent.ElevationProvideris in charge of analyzing it).- Returns:
- The elevation associated with the query; or
nullif none.
-
size
public int size()
Description copied from interface:QueryElevationComponent.ElevationProviderGets the number of query elevations in thisQueryElevationComponent.ElevationProvider.- Specified by:
sizein interfaceQueryElevationComponent.ElevationProvider
-
-