Interface ProductSearchRequest
Example to create an instance using the builder pattern
ProductSearchRequest productSearchRequest = ProductSearchRequest.builder()
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductSearchRequestBuilder
builder()
builder factory method for ProductSearchRequeststatic ProductSearchRequestBuilder
builder
(ProductSearchRequest template) create builder for ProductSearchRequest instancestatic ProductSearchRequest
deepCopy
(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.The search can return Products where not all Product Variants match the search criteria.The number of search results to be skipped in the response for pagination.@Valid SearchQuery
Specify an additional filter on the result of thequery
after the API calculatedfacets
.Controls data integration with Product Projection parameters.@Valid SearchQuery
getQuery()
The search query against searchable Product fields.@Valid List<SearchSorting>
getSort()
Controls how results to your query are sorted.static ProductSearchRequest
of()
factory methodstatic ProductSearchRequest
of
(ProductSearchRequest template) factory method to create a shallow copy ProductSearchRequestvoid
setFacets
(ProductSearchFacetExpression... facets) Set this field to request facets.void
setFacets
(List<ProductSearchFacetExpression> facets) Set this field to request facets.void
The maximum number of search results to be returned in one page.void
setMarkMatchingVariants
(Boolean markMatchingVariants) The search can return Products where not all Product Variants match the search criteria.void
The number of search results to be skipped in the response for pagination.void
setPostFilter
(SearchQuery postFilter) Specify an additional filter on the result of thequery
after the API calculatedfacets
.void
setProductProjectionParameters
(ProductSearchProjectionParams productProjectionParameters) Controls data integration with Product Projection parameters.void
setQuery
(SearchQuery query) The search query against searchable Product fields.void
setSort
(SearchSorting... sort) Controls how results to your query are sorted.void
setSort
(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> T
withProductSearchRequest
(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()The search can return Products where not all Product Variants match the search criteria. If
true
, the response will include a field calledmatchingVariants
that contains thesku
of Product Variants that match the search query. If the query does not specify any variant-level criteria,matchingVariants
will be null signifying that all Product Variants are a match.- 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
query
after 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
The search can return Products where not all Product Variants match the search criteria. If
true
, the response will include a field calledmatchingVariants
that contains thesku
of Product Variants that match the search query. If the query does not specify any variant-level criteria,matchingVariants
will be null signifying that all Product Variants are a match.- 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
query
after 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
-
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
-