public abstract class AbstractQueryDecorator extends Object implements Query
Query abstract decorator.Query.OperatorDEFAULT_PAGE_SIZE| Constructor and Description |
|---|
AbstractQueryDecorator(Query query) |
| Modifier and Type | Method and Description |
|---|---|
<T extends SolrDataQuery> |
addCriteria(Criteria criteria)
Append criteria to query.
|
<T extends Query> |
addFilterQuery(FilterQuery query)
add query to filter results Corresponds to
fq in solr |
<T extends Query> |
addGroupByField(Field field)
add the given field to those used for grouping result Corresponds to '' in solr
|
<T extends Query> |
addProjectionOnField(Field field)
add given Field to those included in result.
|
<T extends Query> |
addSort(Sort sort)
Add
Sort to query |
Criteria |
getCriteria() |
Query |
getDecoratedQuery() |
Query.Operator |
getDefaultOperator()
Get the specified default operator for query expressions, overriding the default operator specified in the
schema.xml file. |
String |
getDefType()
Get the default type of query, if one has been specified.
|
List<FilterQuery> |
getFilterQueries()
Get filter queries if defined
|
List<Field> |
getGroupByFields()
Get group by fields if defined
|
GroupOptions |
getGroupOptions() |
Join |
getJoin() |
Long |
getOffset()
Get number of rows to skip.
|
Pageable |
getPageRequest()
Deprecated.
|
List<Field> |
getProjectionOnFields()
Get projection fields if defined
|
Class<?> |
getQueryType()
Get the
Class of the originally decorated query. |
String |
getRequestHandler()
Returns the request handler.
|
Integer |
getRows()
Get number of rows to fetch.
|
Sort |
getSort() |
SpellcheckOptions |
getSpellcheckOptions() |
StatsOptions |
getStatsOptions() |
Integer |
getTimeAllowed()
Return the time (in milliseconds) allowed for a search to finish
|
void |
setDefaultOperator(Query.Operator operator)
Set the default operator
q.op for query expressions |
void |
setDefType(String defType)
Sets the default type to be used by the query.
|
<T extends Query> |
setGroupOptions(GroupOptions groupOptions)
Sets
GroupOptions for this Query. |
void |
setJoin(Join join)
Set values for join {@code !
|
<T extends Query> |
setOffset(Long offset)
Set the number of rows to skip.
|
<T extends Query> |
setPageRequest(Pageable pageable)
restrict result to entries on given page.
|
void |
setRequestHandler(String requestHandler)
Sets the request handler.
|
<T extends Query> |
setRows(Integer rows)
Set the number of rows to fetch.
|
<T extends Query> |
setSpellcheckOptions(SpellcheckOptions spellcheckOptions)
Set the
SpellcheckOptions to enable spellchecking. |
<T extends Query> |
setStatsOptions(StatsOptions statsOptions)
Set
StatsOptions for this Query. |
<T extends Query> |
setTimeAllowed(Integer timeAllowed)
The time in milliseconds allowed for a search to finish.
|
public AbstractQueryDecorator(Query query)
public <T extends SolrDataQuery> T addCriteria(Criteria criteria)
SolrDataQueryaddCriteria in interface SolrDataQuery@Nullable public Criteria getCriteria()
getCriteria in interface SolrDataQuerypublic void setJoin(Join join)
SolrDataQuery!join from=inner_id to=outer_idsetJoin in interface SolrDataQuerypublic Join getJoin()
getJoin in interface SolrDataQuerypublic <T extends Query> T addProjectionOnField(Field field)
Queryfl parameter in solr.addProjectionOnField in interface Querypublic <T extends Query> T setPageRequest(Pageable pageable)
Querystart and row parameter in solrsetPageRequest in interface Querypublic <T extends Query> T addGroupByField(Field field)
QueryaddGroupByField in interface Querypublic <T extends Query> T addFilterQuery(FilterQuery query)
Queryfq in solraddFilterQuery in interface Querypublic <T extends Query> T setTimeAllowed(Integer timeAllowed)
QuerysetTimeAllowed in interface Querypublic List<FilterQuery> getFilterQueries()
QuerygetFilterQueries in interface Query@Deprecated public Pageable getPageRequest()
QuerygetPageRequest in interface Querypublic List<Field> getGroupByFields()
QuerygetGroupByFields in interface Querypublic List<Field> getProjectionOnFields()
QuerygetProjectionOnFields in interface Querypublic <T extends Query> T addSort(Sort sort)
QuerySort to query@Nullable public Integer getTimeAllowed()
QuerygetTimeAllowed in interface Querypublic void setDefaultOperator(Query.Operator operator)
Queryq.op for query expressionssetDefaultOperator in interface Querypublic Query.Operator getDefaultOperator()
Queryschema.xml file.getDefaultOperator in interface Querypublic String getDefType()
QuerygetDefType in interface Querypublic void setDefType(String defType)
QuerysetDefType in interface Querypublic String getRequestHandler()
QuerygetRequestHandler in interface Querypublic void setRequestHandler(String requestHandler)
QuerysetRequestHandler in interface Querypublic <T extends Query> T setOffset(Long offset)
Querypublic <T extends Query> T setRows(Integer rows)
Querypublic Long getOffset()
Querypublic Integer getRows()
Querypublic <T extends Query> T setGroupOptions(GroupOptions groupOptions)
QueryGroupOptions for this Query.setGroupOptions in interface Querypublic GroupOptions getGroupOptions()
getGroupOptions in interface Querypublic <T extends Query> T setStatsOptions(StatsOptions statsOptions)
QueryStatsOptions for this Query.setStatsOptions in interface Querypublic StatsOptions getStatsOptions()
getStatsOptions in interface QueryStatsOptions or null if not set.public <T extends Query> T setSpellcheckOptions(SpellcheckOptions spellcheckOptions)
QuerySpellcheckOptions to enable spellchecking.setSpellcheckOptions in interface QueryspellcheckOptions - can be null.public SpellcheckOptions getSpellcheckOptions()
getSpellcheckOptions in interface Querypublic Class<?> getQueryType()
Class of the originally decorated query.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.