Class ProductSearchFacetRangesValueBuilder
- All Implemented Interfaces:
Builder<ProductSearchFacetRangesValue>
Example to create an instance using the builder pattern
ProductSearchFacetRangesValue productSearchFacetRangesValue = ProductSearchFacetRangesValue.builder()
.name("{name}")
.field("{field}")
.plusRanges(rangesBuilder -> rangesBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddRanges
(Function<ProductSearchFacetRangesFacetRangeBuilder, ProductSearchFacetRangesFacetRange> builder) Define ranges for the facet.build()
builds ProductSearchFacetRangesValue with checking for non-null required valuesbuilds ProductSearchFacetRangesValue without checking for non-null required valuesThe searchable Product field to facet on.fieldType
(SearchFieldType fieldType) If thefield
is not standard, this must be the Attribute type.filter
(SearchQuery filter) Additional filtering expression to apply to the search result before calculating the facet.filter
(Function<SearchQueryBuilder, SearchQueryBuilder> builder) Additional filtering expression to apply to the search result before calculating the facet.getField()
The searchable Product field to facet on.If thefield
is not standard, this must be the Attribute type.Additional filtering expression to apply to the search result before calculating the facet.String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47.getLevel()
Specify whether to count Products (products
) or Product Variants (variants
).getName()
Name of the ranges facet to appear in the ProductSearchFacetResultBucket.Define ranges for the facet.getScope()
Whether the facet must consider only the Products resulting from the search (query
) or all the Products (all
).String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47.Specify whether to count Products (products
) or Product Variants (variants
).Name of the ranges facet to appear in the ProductSearchFacetResultBucket.of()
factory method for an instance of ProductSearchFacetRangesValueBuilderof
(ProductSearchFacetRangesValue template) create builder for ProductSearchFacetRangesValue instanceplusRanges
(ProductSearchFacetRangesFacetRange... ranges) Define ranges for the facet.plusRanges
(Function<ProductSearchFacetRangesFacetRangeBuilder, ProductSearchFacetRangesFacetRangeBuilder> builder) Define ranges for the facet.ranges
(ProductSearchFacetRangesFacetRange... ranges) Define ranges for the facet.ranges
(List<ProductSearchFacetRangesFacetRange> ranges) Define ranges for the facet.scope
(ProductSearchFacetScopeEnum scope) Whether the facet must consider only the Products resulting from the search (query
) or all the Products (all
).setRanges
(Function<ProductSearchFacetRangesFacetRangeBuilder, ProductSearchFacetRangesFacetRange> builder) Define ranges for the facet.withFilter
(Function<SearchQueryBuilder, SearchQuery> builder) Additional filtering expression to apply to the search result before calculating the facet.withRanges
(Function<ProductSearchFacetRangesFacetRangeBuilder, ProductSearchFacetRangesFacetRangeBuilder> builder) Define ranges for the facet.
-
Constructor Details
-
ProductSearchFacetRangesValueBuilder
public ProductSearchFacetRangesValueBuilder()
-
-
Method Details
-
name
Name of the ranges facet to appear in the ProductSearchFacetResultBucket.
- Parameters:
name
- value to be set- Returns:
- Builder
-
scope
Whether the facet must consider only the Products resulting from the search (
query
) or all the Products (all
).- Parameters:
scope
- value to be set- Returns:
- Builder
-
filter
public ProductSearchFacetRangesValueBuilder filter(Function<SearchQueryBuilder, SearchQueryBuilder> builder) Additional filtering expression to apply to the search result before calculating the facet.
- Parameters:
builder
- function to build the filter value- Returns:
- Builder
-
withFilter
public ProductSearchFacetRangesValueBuilder withFilter(Function<SearchQueryBuilder, SearchQuery> builder) Additional filtering expression to apply to the search result before calculating the facet.
- Parameters:
builder
- function to build the filter value- Returns:
- Builder
-
filter
Additional filtering expression to apply to the search result before calculating the facet.
- Parameters:
filter
- value to be set- Returns:
- Builder
-
level
Specify whether to count Products (
products
) or Product Variants (variants
).- Parameters:
level
- value to be set- Returns:
- Builder
-
field
The searchable Product field to facet on.
- Parameters:
field
- value to be set- Returns:
- Builder
-
ranges
Define ranges for the facet.
- Parameters:
ranges
- value to be set- Returns:
- Builder
-
ranges
Define ranges for the facet.
- Parameters:
ranges
- value to be set- Returns:
- Builder
-
plusRanges
public ProductSearchFacetRangesValueBuilder plusRanges(ProductSearchFacetRangesFacetRange... ranges) Define ranges for the facet.
- Parameters:
ranges
- value to be set- Returns:
- Builder
-
plusRanges
public ProductSearchFacetRangesValueBuilder plusRanges(Function<ProductSearchFacetRangesFacetRangeBuilder, ProductSearchFacetRangesFacetRangeBuilder> builder) Define ranges for the facet.
- Parameters:
builder
- function to build the ranges value- Returns:
- Builder
-
withRanges
public ProductSearchFacetRangesValueBuilder withRanges(Function<ProductSearchFacetRangesFacetRangeBuilder, ProductSearchFacetRangesFacetRangeBuilder> builder) Define ranges for the facet.
- Parameters:
builder
- function to build the ranges value- Returns:
- Builder
-
addRanges
public ProductSearchFacetRangesValueBuilder addRanges(Function<ProductSearchFacetRangesFacetRangeBuilder, ProductSearchFacetRangesFacetRange> builder) Define ranges for the facet.
- Parameters:
builder
- function to build the ranges value- Returns:
- Builder
-
setRanges
public ProductSearchFacetRangesValueBuilder setRanges(Function<ProductSearchFacetRangesFacetRangeBuilder, ProductSearchFacetRangesFacetRange> builder) Define ranges for the facet.
- Parameters:
builder
- function to build the ranges value- Returns:
- Builder
-
language
String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example:
en
,en-US
,zh-Hans-SG
.- Parameters:
language
- value to be set- Returns:
- Builder
-
fieldType
If the
field
is not standard, this must be the Attribute type.- Parameters:
fieldType
- value to be set- Returns:
- Builder
-
getName
Name of the ranges facet to appear in the ProductSearchFacetResultBucket.
- Returns:
- name
-
getScope
Whether the facet must consider only the Products resulting from the search (
query
) or all the Products (all
).- Returns:
- scope
-
getFilter
Additional filtering expression to apply to the search result before calculating the facet.
- Returns:
- filter
-
getLevel
Specify whether to count Products (
products
) or Product Variants (variants
).- Returns:
- level
-
getField
The searchable Product field to facet on.
- Returns:
- field
-
getRanges
Define ranges for the facet.
- Returns:
- ranges
-
getLanguage
String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example:
en
,en-US
,zh-Hans-SG
.- Returns:
- language
-
getFieldType
If the
field
is not standard, this must be the Attribute type.- Returns:
- fieldType
-
build
builds ProductSearchFacetRangesValue with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSearchFacetRangesValue>
- Returns:
- ProductSearchFacetRangesValue
-
buildUnchecked
builds ProductSearchFacetRangesValue without checking for non-null required values- Returns:
- ProductSearchFacetRangesValue
-
of
factory method for an instance of ProductSearchFacetRangesValueBuilder- Returns:
- builder
-
of
create builder for ProductSearchFacetRangesValue instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-