Class AbstractQueryDecorator
java.lang.Object
org.springframework.data.solr.core.query.AbstractQueryDecorator
- All Implemented Interfaces:
Query,SolrDataQuery
- Direct Known Subclasses:
AbstractFacetAndHighlightQueryDecorator,AbstractFacetQueryDecorator,AbstractHighlightQueryDecorator
General purpose
Query abstract decorator.- Since:
- 1.4
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.solr.core.query.Query
Query.Operator -
Field Summary
Fields inherited from interface org.springframework.data.solr.core.query.Query
DEFAULT_PAGE_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends SolrDataQuery>
TaddCriteria(Criteria criteria) Append criteria to query.<T extends Query>
TaddFilterQuery(FilterQuery query) add query to filter results Corresponds tofqin solr<T extends Query>
TaddGroupByField(Field field) add the given field to those used for grouping result Corresponds to '' in solr<T extends Query>
TaddProjectionOnField(Field field) add given Field to those included in result.<T extends Query>
TaddSort(org.springframework.data.domain.Sort sort) AddSortto queryGet the specified default operator for query expressions, overriding the default operator specified in theschema.xmlfile.Get the default type of query, if one has been specified.Get filter queries if definedGet group by fields if definedgetJoin()Get number of rows to skip.org.springframework.data.domain.PageableDeprecated.Get projection fields if definedClass<?>Get theClassof the originally decorated query.Returns the request handler.getRows()Get number of rows to fetch.org.springframework.data.domain.SortgetSort()Return the time (in milliseconds) allowed for a search to finishvoidsetDefaultOperator(Query.Operator operator) Set the default operatorq.opfor query expressionsvoidsetDefType(String defType) Sets the default type to be used by the query.<T extends Query>
TsetGroupOptions(GroupOptions groupOptions) SetsGroupOptionsfor thisQuery.voidSet values for join!join from=inner_id to=outer_id<T extends Query>
TSet the number of rows to skip.<T extends Query>
TsetPageRequest(org.springframework.data.domain.Pageable pageable) restrict result to entries on given page.voidsetRequestHandler(String requestHandler) Sets the request handler.<T extends Query>
TSet the number of rows to fetch.<T extends Query>
TsetSpellcheckOptions(SpellcheckOptions spellcheckOptions) Set theSpellcheckOptionsto enable spellchecking.<T extends Query>
TsetStatsOptions(StatsOptions statsOptions) SetStatsOptionsfor thisQuery.<T extends Query>
TsetTimeAllowed(Integer timeAllowed) The time in milliseconds allowed for a search to finish.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.solr.core.query.Query
projectAllFields
-
Constructor Details
-
AbstractQueryDecorator
-
-
Method Details
-
addCriteria
Description copied from interface:SolrDataQueryAppend criteria to query. Criteria must not be null, nor point to a field with null value.- Specified by:
addCriteriain interfaceSolrDataQuery- Returns:
-
getCriteria
- Specified by:
getCriteriain interfaceSolrDataQuery- Returns:
-
setJoin
Description copied from interface:SolrDataQuerySet values for join!join from=inner_id to=outer_id- Specified by:
setJoinin interfaceSolrDataQuery
-
getJoin
- Specified by:
getJoinin interfaceSolrDataQuery- Returns:
-
addProjectionOnField
Description copied from interface:Queryadd given Field to those included in result. Corresponds to theflparameter in solr.- Specified by:
addProjectionOnFieldin interfaceQuery- Returns:
-
setPageRequest
Description copied from interface:Queryrestrict result to entries on given page. Corresponds to thestartandrowparameter in solr- Specified by:
setPageRequestin interfaceQuery- Returns:
-
addGroupByField
Description copied from interface:Queryadd the given field to those used for grouping result Corresponds to '' in solr- Specified by:
addGroupByFieldin interfaceQuery- Returns:
-
addFilterQuery
Description copied from interface:Queryadd query to filter results Corresponds tofqin solr- Specified by:
addFilterQueryin interfaceQuery- Returns:
-
setTimeAllowed
Description copied from interface:QueryThe time in milliseconds allowed for a search to finish. Values<= 0mean no time restriction.- Specified by:
setTimeAllowedin interfaceQuery- Returns:
-
getFilterQueries
Description copied from interface:QueryGet filter queries if defined- Specified by:
getFilterQueriesin interfaceQuery- Returns:
-
getPageRequest
Deprecated.Description copied from interface:QueryGet page settings if defined.- Specified by:
getPageRequestin interfaceQuery- Returns:
-
getGroupByFields
Description copied from interface:QueryGet group by fields if defined- Specified by:
getGroupByFieldsin interfaceQuery- Returns:
-
getProjectionOnFields
Description copied from interface:QueryGet projection fields if defined- Specified by:
getProjectionOnFieldsin interfaceQuery- Returns:
-
addSort
Description copied from interface:QueryAddSortto query -
getSort
@Nullable public org.springframework.data.domain.Sort getSort() -
getTimeAllowed
Description copied from interface:QueryReturn the time (in milliseconds) allowed for a search to finish- Specified by:
getTimeAllowedin interfaceQuery- Returns:
-
setDefaultOperator
Description copied from interface:QuerySet the default operatorq.opfor query expressions- Specified by:
setDefaultOperatorin interfaceQuery
-
getDefaultOperator
Description copied from interface:QueryGet the specified default operator for query expressions, overriding the default operator specified in theschema.xmlfile.- Specified by:
getDefaultOperatorin interfaceQuery- Returns:
-
getDefType
Description copied from interface:QueryGet the default type of query, if one has been specified. Overrides the default type specified in the solrconfig.xml file.- Specified by:
getDefTypein interfaceQuery- Returns:
-
setDefType
Description copied from interface:QuerySets the default type to be used by the query.- Specified by:
setDefTypein interfaceQuery
-
getRequestHandler
Description copied from interface:QueryReturns the request handler.- Specified by:
getRequestHandlerin interfaceQuery
-
setRequestHandler
Description copied from interface:QuerySets the request handler.- Specified by:
setRequestHandlerin interfaceQuery
-
setOffset
Description copied from interface:QuerySet the number of rows to skip. -
setRows
Description copied from interface:QuerySet the number of rows to fetch. -
getOffset
Description copied from interface:QueryGet number of rows to skip. -
getRows
Description copied from interface:QueryGet number of rows to fetch. -
setGroupOptions
Description copied from interface:QuerySetsGroupOptionsfor thisQuery.- Specified by:
setGroupOptionsin interfaceQuery- Returns:
-
getGroupOptions
- Specified by:
getGroupOptionsin interfaceQuery- Returns:
- group options
-
setStatsOptions
Description copied from interface:QuerySetStatsOptionsfor thisQuery.- Specified by:
setStatsOptionsin interfaceQuery- Returns:
-
getStatsOptions
- Specified by:
getStatsOptionsin interfaceQuery- Returns:
StatsOptionsor null if not set.
-
setSpellcheckOptions
Description copied from interface:QuerySet theSpellcheckOptionsto enable spellchecking.- Specified by:
setSpellcheckOptionsin interfaceQuery- Parameters:
spellcheckOptions- can be null.- Returns:
- never null.
-
getSpellcheckOptions
- Specified by:
getSpellcheckOptionsin interfaceQuery- Returns:
- null if not set.
-
getQueryType
Get theClassof the originally decorated query.- Returns:
- never null.
- Since:
- 2.1
-
getDecoratedQuery
- Returns:
- the decorated
Query. Never null. - Since:
- 3.0.6
-