Class SearchRequest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Optional.The rule-based RSQL filters used to check if a related product is a member of the specified category.Optional.The list of filters to apply to this query.Locale override to be used when fetching labels for facets and sorts.getQuery()
The raw search query.Additional rule-based RSQL filters to apply to this query.getType()
TheIndexableType
for this query.int
hashCode()
boolean
isDebug()
If set to true, a string containing debug information about the query results will be returned.boolean
If set to true, the "score" field will be added to the field list to return the ranking score of each document.boolean
This is set to true if this query has already been run once to avoid unnecessarily spellchecking the query a second time.void
setAutoCorrectQuery
(Boolean autoCorrectQuery) Optional.void
setCategoryProductMembershipFilters
(RuleFilter categoryProductMembershipFilters) The rule-based RSQL filters used to check if a related product is a member of the specified category.void
setCustomerContext
(CustomerContext customerContext) void
setDebug
(boolean debug) If set to true, a string containing debug information about the query results will be returned.void
setEnableSpellCheck
(Boolean enableSpellCheck) Optional.void
setFilters
(List<Filter> filters) The list of filters to apply to this query.void
setLocaleOverrideForFacetAndSortLabels
(Locale localeOverrideForFacetAndSortLabels) Locale override to be used when fetching labels for facets and sorts.void
The raw search query.void
setRuleFilters
(RuleFilter ruleFilters) Additional rule-based RSQL filters to apply to this query.void
setShowScores
(boolean showScores) If set to true, the "score" field will be added to the field list to return the ranking score of each document.void
setSpellCheckedQuery
(boolean spellCheckedQuery) This is set to true if this query has already been run once to avoid unnecessarily spellchecking the query a second time.void
setType
(IndexableType type) TheIndexableType
for this query.toString()
-
Constructor Details
-
SearchRequest
public SearchRequest()
-
-
Method Details
-
getQuery
The raw search query.- Returns:
- The raw search query
-
getType
TheIndexableType
for this query.- Returns:
- The type for this query
-
getFilters
The list of filters to apply to this query.- Returns:
- The list of filters to apply to this query
-
getRuleFilters
Additional rule-based RSQL filters to apply to this query.- Returns:
- RSQL filters to apply to this query
-
getCategoryProductMembershipFilters
The rule-based RSQL filters used to check if a related product is a member of the specified category. Only applies when the category's product membership type is RULE_BASED.- Returns:
- RSQL filters to apply to this query
-
getEnableSpellCheck
Optional.
Overrides default setting for spellcheck.
Set to false to disable spellcheck. This completely disables spellcheck, so also affects automatic query correction.- Returns:
- whether spell check should be enabled for this request
- See Also:
-
getAutoCorrectQuery
Optional.
Overrides default setting for automatic query correction.
If set to true, if no query results are found on the original query and a spelling correction is available, another query will be performed automatically- Returns:
- whether auto-correct querying should be enabled for this request
- See Also:
-
enableSpellCheck
SearchResponse.isCorrectedQuery()
-
isSpellCheckedQuery
public boolean isSpellCheckedQuery()This is set to true if this query has already been run once to avoid unnecessarily spellchecking the query a second time.- Returns:
- whether this query has already been spell checked
-
isDebug
public boolean isDebug()If set to true, a string containing debug information about the query results will be returned.- Returns:
- whether debug information should be returned
-
isShowScores
public boolean isShowScores()If set to true, the "score" field will be added to the field list to return the ranking score of each document.- Returns:
- whether scoring information should be returned
-
getCustomerContext
-
getLocaleOverrideForFacetAndSortLabels
Locale override to be used when fetching labels for facets and sorts. This is typically used when making a search request from the admin application.- Returns:
- the locale override
- Since:
- Search Service 2.1.4, Release Train 2.1.4, Search Service 2.2.0, Release Train 2.2.0
-
setQuery
The raw search query.- Parameters:
query
- The raw search query
-
setType
TheIndexableType
for this query.- Parameters:
type
- The type for this query
-
setFilters
The list of filters to apply to this query.- Parameters:
filters
- The list of filters to apply to this query
-
setRuleFilters
Additional rule-based RSQL filters to apply to this query.- Parameters:
ruleFilters
- RSQL filters to apply to this query
-
setCategoryProductMembershipFilters
The rule-based RSQL filters used to check if a related product is a member of the specified category. Only applies when the category's product membership type is RULE_BASED.- Parameters:
categoryProductMembershipFilters
- RSQL filters to apply to this query
-
setEnableSpellCheck
Optional.
Overrides default setting for spellcheck.
Set to false to disable spellcheck. This completely disables spellcheck, so also affects automatic query correction.- Parameters:
enableSpellCheck
- whether spell check should be enabled for this request- See Also:
-
setAutoCorrectQuery
Optional.
Overrides default setting for automatic query correction.
If set to true, if no query results are found on the original query and a spelling correction is available, another query will be performed automatically- Parameters:
enableSpellCheck
- whether auto-correct querying should be enabled for this request- See Also:
-
enableSpellCheck
SearchResponse.isCorrectedQuery()
-
setSpellCheckedQuery
public void setSpellCheckedQuery(boolean spellCheckedQuery) This is set to true if this query has already been run once to avoid unnecessarily spellchecking the query a second time.- Parameters:
spellCheckedQuery
- whether this query has already been spell checked
-
setDebug
public void setDebug(boolean debug) If set to true, a string containing debug information about the query results will be returned.- Parameters:
debug
- whether debug information should be returned
-
setShowScores
public void setShowScores(boolean showScores) If set to true, the "score" field will be added to the field list to return the ranking score of each document.- Parameters:
showScores
- whether scoring information should be returned
-
setCustomerContext
-
setLocaleOverrideForFacetAndSortLabels
Locale override to be used when fetching labels for facets and sorts. This is typically used when making a search request from the admin application.- Parameters:
localeOverrideForFacetAndSortLabels
- the locale override- Since:
- Search Service 2.1.4, Release Train 2.1.4, Search Service 2.2.0, Release Train 2.2.0
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-