public class SearchRequest<P extends SearchParameter> extends PageableBase
Modifier and Type | Class and Description |
---|---|
static interface |
SearchRequest.QueryField |
Pageable.OffsetLimitParameters
Constructor and Description |
---|
SearchRequest()
Constructor with default paging offset & limit.
|
SearchRequest(long offset,
int limit)
Minimal paging constructor.
|
SearchRequest(Pageable page)
Minimal paging constructor.
|
SearchRequest(String query)
Simple query constructor with default paging offset & limit.
|
Modifier and Type | Method and Description |
---|---|
void |
addParameter(P parameter,
boolean value)
Adds the specified boolean parameter.
|
void |
addParameter(P parameter,
Date value)
Adds the specified date parameter as an ISO date.
|
void |
addParameter(P parameter,
double value)
Adds the specified double parameter.
|
void |
addParameter(P parameter,
Enum<?> value)
Adds the specified parameter.
|
void |
addParameter(P parameter,
int value)
Adds the specified int parameter.
|
void |
addParameter(P parameter,
IsoDateInterval value)
Adds the specified date parameter as an ISO date interval.
|
void |
addParameter(P parameter,
Iterable<String> values)
Adds the specified parameter.
|
void |
addParameter(P parameter,
long value)
Adds the specified long parameter.
|
void |
addParameter(P parameter,
String... values)
Adds the specified parameter.
|
void |
addParameter(P parameter,
String value)
Adds the specified parameter.
|
Set<SearchRequest.QueryField> |
getHighlightFields()
Defines the fields to be highlighted if highlighting is activated.
|
Map<P,Set<String>> |
getParameters()
List of input parameters of the search operation.
|
String |
getQ()
Query parameter.
|
Set<SearchRequest.QueryField> |
getQFields()
Defines whether to match against fields with scientific or vernacular names or both.
|
int |
getSpellCheckCount() |
boolean |
isHighlight() |
boolean |
isSpellCheck() |
void |
setHighlight(boolean highlight) |
void |
setHighlightFields(Set<SearchRequest.QueryField> highlightFields) |
void |
setParameters(Map<P,Set<String>> parameters)
Sets the list of parameters.
|
void |
setQ(String q) |
void |
setQFields(Set<SearchRequest.QueryField> qFields) |
void |
setSpellCheck(boolean spellCheck) |
void |
setSpellCheckCount(int spellCheckCount) |
String |
toString() |
addOffset, copyPagingValues, equals, getLimit, getOffset, hashCode, setLimit, setOffset
public SearchRequest()
public SearchRequest(String query)
query
- string for requestpublic SearchRequest(Pageable page)
public SearchRequest(long offset, int limit)
public boolean isHighlight()
public void setHighlight(boolean highlight)
highlight
- the highlight to setpublic boolean isSpellCheck()
public void setSpellCheck(boolean spellCheck)
spellCheck
- the highlight to setpublic int getSpellCheckCount()
public void setSpellCheckCount(int spellCheckCount)
spellCheckCount
- number of spell check suggestionspublic Set<SearchRequest.QueryField> getQFields()
public void setQFields(Set<SearchRequest.QueryField> qFields)
public Set<SearchRequest.QueryField> getHighlightFields()
public void setHighlightFields(Set<SearchRequest.QueryField> highlightFields)
public Map<P,Set<String>> getParameters()
public void setParameters(Map<P,Set<String>> parameters)
public void addParameter(P parameter, Iterable<String> values)
parameter
- parameter to add values forvalues
- list of values of the parameter to addpublic void addParameter(P parameter, String... values)
parameter
- parameter to add values forvalues
- list of values of the parameter to addpublic void addParameter(P parameter, String value)
parameter
- parameter to add values forvalue
- value of the parameter to addpublic void addParameter(P parameter, long value)
parameter
- parameter to add values forvalue
- value of the parameter to addpublic void addParameter(P parameter, int value)
parameter
- parameter to add values forvalue
- value of the parameter to addpublic void addParameter(P parameter, double value)
parameter
- parameter to add values forvalue
- value of the parameter to addpublic void addParameter(P parameter, boolean value)
parameter
- parameter to add values forvalue
- value of the parameter to addpublic void addParameter(P parameter, Enum<?> value)
parameter
- parameter to add values forvalue
- enum value of the parameter to addpublic void addParameter(P parameter, Date value)
parameter
- parameter to add date forvalue
- date value of the parameter to addpublic void addParameter(P parameter, IsoDateInterval value)
parameter
- parameter to add date interval forvalue
- date value of the parameter to addpublic String toString()
toString
in class PageableBase
Copyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.