Interface ProductSearchRequest
Example to create an instance using the builder pattern
ProductSearchRequest productSearchRequest = ProductSearchRequest.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductSearchRequestBuilderbuilder()builder factory method for ProductSearchRequeststatic ProductSearchRequestBuilderbuilder(ProductSearchRequest template) create builder for ProductSearchRequest instancecopyDeep()static ProductSearchRequestdeepCopy(ProductSearchRequest template) factory method to create a deep copy of ProductSearchRequest@Valid List<ProductSearchFacetExpression>Set this field to request facets.getLimit()The maximum number of search results to be returned in one page.Ifqueryspecifies an expression for a Product Variant field, set this totrueto get additional information for each returned Product about which Product Variants match the search query.The number of search results to be skipped in the response for pagination.@Valid SearchQuerySpecify an additional filter on the result of thequeryafter the API calculatedfacets.Controls data integration with Product Projection parameters.@Valid SearchQuerygetQuery()The search query against searchable Product fields.@Valid List<SearchSorting>getSort()Controls how results to your query are sorted.static ProductSearchRequestof()factory methodstatic ProductSearchRequestof(ProductSearchRequest template) factory method to create a shallow copy ProductSearchRequestvoidsetFacets(ProductSearchFacetExpression... facets) Set this field to request facets.voidsetFacets(List<ProductSearchFacetExpression> facets) Set this field to request facets.voidThe maximum number of search results to be returned in one page.voidsetMarkMatchingVariants(Boolean markMatchingVariants) Ifqueryspecifies an expression for a Product Variant field, set this totrueto get additional information for each returned Product about which Product Variants match the search query.voidThe number of search results to be skipped in the response for pagination.voidsetPostFilter(SearchQuery postFilter) Specify an additional filter on the result of thequeryafter the API calculatedfacets.voidsetProductProjectionParameters(ProductSearchProjectionParams productProjectionParameters) Controls data integration with Product Projection parameters.voidsetQuery(SearchQuery query) The search query against searchable Product fields.voidsetSort(SearchSorting... sort) Controls how results to your query are sorted.voidsetSort(List<SearchSorting> sort) Controls how results to your query are sorted.static com.fasterxml.jackson.core.type.TypeReference<ProductSearchRequest>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithProductSearchRequest(Function<ProductSearchRequest, T> helper) accessor map function
-
Method Details
-
getQuery
The search query against searchable Product fields.
- Returns:
- query
-
getSort
Controls how results to your query are sorted. If not provided, the results are sorted by relevance score in descending order.
- Returns:
- sort
-
getLimit
Integer getLimit()The maximum number of search results to be returned in one page.
- Returns:
- limit
-
getOffset
Integer getOffset()The number of search results to be skipped in the response for pagination.
- Returns:
- offset
-
getMarkMatchingVariants
Boolean getMarkMatchingVariants()If
queryspecifies an expression for a Product Variant field, set this totrueto get additional information for each returned Product about which Product Variants match the search query. For details, see matching variants.- Returns:
- markMatchingVariants
-
getProductProjectionParameters
Controls data integration with Product Projection parameters. If not set, the result does not include the Product Projection.
- Returns:
- productProjectionParameters
-
getFacets
Set this field to request facets.
- Returns:
- facets
-
getPostFilter
Specify an additional filter on the result of the
queryafter the API calculatedfacets. This feature assists you in implementing faceted search.- Returns:
- postFilter
-
setQuery
The search query against searchable Product fields.
- Parameters:
query- value to be set
-
setSort
Controls how results to your query are sorted. If not provided, the results are sorted by relevance score in descending order.
- Parameters:
sort- values to be set
-
setSort
Controls how results to your query are sorted. If not provided, the results are sorted by relevance score in descending order.
- Parameters:
sort- values to be set
-
setLimit
The maximum number of search results to be returned in one page.
- Parameters:
limit- value to be set
-
setOffset
The number of search results to be skipped in the response for pagination.
- Parameters:
offset- value to be set
-
setMarkMatchingVariants
If
queryspecifies an expression for a Product Variant field, set this totrueto get additional information for each returned Product about which Product Variants match the search query. For details, see matching variants.- Parameters:
markMatchingVariants- value to be set
-
setProductProjectionParameters
Controls data integration with Product Projection parameters. If not set, the result does not include the Product Projection.
- Parameters:
productProjectionParameters- value to be set
-
setFacets
Set this field to request facets.
- Parameters:
facets- values to be set
-
setFacets
Set this field to request facets.
- Parameters:
facets- values to be set
-
setPostFilter
Specify an additional filter on the result of the
queryafter the API calculatedfacets. This feature assists you in implementing faceted search.- Parameters:
postFilter- value to be set
-
of
factory method- Returns:
- instance of ProductSearchRequest
-
of
factory method to create a shallow copy ProductSearchRequest- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ProductSearchRequest copyDeep() -
deepCopy
factory method to create a deep copy of ProductSearchRequest- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductSearchRequest- Returns:
- builder
-
builder
create builder for ProductSearchRequest instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withProductSearchRequest
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-