1. @sitecore-cloudsdk/search/browser

ComparisonFacetFilter

Version:

Type

Class

Implements

FacetFilterBase

Import path

@sitecore-cloudsdk/search/browser

A filter with relation conditions. Used for filtering facet values by comparing the facet value to a certain value you provide.

Constructor

ComparisonFacetFilter(
  operator: ComparisonOperators,
  value: string
)

Parameters

Name

Type

Description

operator

ComparisonOperators

The operator used for comparing the facet value with the value.

Accepted values:

  • "eq" - equal to

  • "gt" - greater than

  • "gte" - greater than or equal to

  • "lt" - less than

  • "lte" - less than or equal to

value

string

The value to compare the facet values with.

Properties

Name

Type

Description

_operator

ComparisonOperators

Required.

The operator used for comparing the facet value with the value.

_value

string

Required.

The value to compare the facet values with.

Methods

toDTO

Maps the ComparisonFacetFilter instance to its DTO (data transfer object) format.

Signature

toDTO(): ComparisonFacetFilterDTO

Return value

Returns the ComparisonFacetFilter instance in a standardized DTO format.

If you have suggestions for improving this article, let us know!