public interface Query extends SolrDataQuery
| Modifier and Type | Interface and Description |
|---|---|
static class |
Query.Operator
Operator to be used for
q.op |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PAGE_SIZE |
| Modifier and Type | Method and Description |
|---|---|
<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 |
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() |
Long |
getOffset()
Get number of rows to skip.
|
Pageable |
getPageRequest()
Deprecated.
since 1.3. Will be removed in 1.4. Please use
getOffset() and getRows() instead. |
List<Field> |
getProjectionOnFields()
Get projection fields if defined
|
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. |
<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.
|
addCriteria, getCriteria, getJoin, setJoinstatic final int DEFAULT_PAGE_SIZE
<T extends Query> T addProjectionOnField(Field field)
fl parameter in solr.field - <T extends Query> T setPageRequest(Pageable pageable)
start and row parameter in solrpageable - <T extends Query> T setOffset(Long offset)
offset - <T extends Query> T setRows(Integer rows)
rows - <T extends Query> T addGroupByField(Field field)
field - <T extends Query> T addFilterQuery(FilterQuery query)
fq in solrquery - <T extends Query> T setTimeAllowed(Integer timeAllowed)
timeAllowed - List<FilterQuery> getFilterQueries()
@Deprecated Pageable getPageRequest()
getOffset() and getRows() instead.@Nullable Integer getTimeAllowed()
void setDefaultOperator(Query.Operator operator)
q.op for query expressions@Nullable Query.Operator getDefaultOperator()
schema.xml file.@Nullable String getDefType()
void setDefType(String defType)
void setRequestHandler(String requestHandler)
<T extends Query> T setGroupOptions(GroupOptions groupOptions)
GroupOptions for this Query.groupOptions - @Nullable GroupOptions getGroupOptions()
<T extends Query> T setStatsOptions(StatsOptions statsOptions)
StatsOptions for this Query.statsOptions - @Nullable StatsOptions getStatsOptions()
StatsOptions or null if not set.<T extends Query> T setSpellcheckOptions(SpellcheckOptions spellcheckOptions)
SpellcheckOptions to enable spellchecking.spellcheckOptions - can be null.@Nullable SpellcheckOptions getSpellcheckOptions()
Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.