Filter
This topic lists the various filter object definitions included in Sitecore Search JavaScript SDK for React.
A filter object that contains the attribute name, the value, and how to compare the two.
FilterEqual
Creates a filter object that checks if an item's attribute exactly matches the value provided.
|
Property |
Type |
Description |
|---|---|---|
|
|
string |
Required. Name of attribute. |
|
|
any |
Required. The value to compare against. |
FilterLessThan
Creates a filter object that checks if an item's attribute is less than the value provided.
|
Property |
Type |
Description |
|---|---|---|
|
|
string |
Required. Name of attribute. |
|
|
any |
Required. The value to compare against. |
FilterGreaterThan
Creates a filter object that checks if an item's attribute is greater than the value provided.
|
Property |
Type |
Description |
|---|---|---|
|
|
string |
Required. Name of attribute. |
|
|
any |
Required. The value to compare against. |
FilterLessOrEqualThan
Creates a filter object that checks if an item's attribute is less than or exactly matches the value provided.
|
Property |
Type |
Description |
|---|---|---|
|
|
string |
Required. Name of attribute. |
|
|
any |
Required. The value to compare against. |
FilterGreaterOrEqualThan
Creates a filter object that checks if an item's attribute is greater than or exactly matches the value provided.
|
Property |
Type |
Description |
|---|---|---|
|
|
string |
Required. Name of attribute. |
|
|
any |
Required. The value to compare against. |
FilterGeo
Creates a filter object that checks if an item's attribute exactly matches the value provided.
|
Property |
Type |
Description |
|---|---|---|
|
|
string |
Required. Name of attribute. |
|
|
string |
Required. The value to compare against must include a number and the unit. See the example request below for reference. Units accepted include "in", "ft", "yd", "mi", "nmi", "km", "m", "cm", and "mm". |
|
|
float |
Latitude of location in decimal degrees (DD) format. Don't use spaces. For example, 23.928666 |
|
|
float |
Longitude of location in decimal degrees (DD) format. Don't use spaces. For example, -50.928666 |
FilterAnyOf
Creates a filter object that checks if an item's attribute exactly matches any of the values in the array.
|
Property |
Type |
Description |
|---|---|---|
|
|
string |
Required. Name of attribute. |
|
|
array |
Required. The array of values to compare against. |
FilterAnd
Creates a filter object that includes an item when it matches all the filter objects in the provided array.
|
Property |
Type |
Description |
|---|---|---|
|
|
array |
Required. The array of filter objects to compare against. |
FilterOr
Creates a filter object that includes an item when it matches any of the filter objects in the provided array.
|
Property |
Type |
Description |
|---|---|---|
|
|
array |
Required. The array of filter objects to compare against. |
FilterNot
Creates a filter object that excludes an item if its attribute matches the filter objects in the provided array.
|
Property |
Type |
Description |
|---|---|---|
|
|
array |
Required. The array of filter objects to compare against. |
FilterGeoWithin
Creates a filter object that excludes items outside the polygon created by an array of coordinates, known as a point object.
|
Property |
Type |
Description |
|---|---|---|
|
|
string |
Name or reference of location. |
|
|
Array<Point> |
Required. Array of |
The point object contains latitude and longitude coordinates. See the example request below for reference.
|
Property |
Type |
Description |
|---|---|---|
|
|
float |
Required. Latitude of location in decimal degrees (DD) format. Don't use spaces. For example: -28.281932 |
|
|
float |
Required. Longitude of location in decimal degrees (DD) format. Don't use spaces. For example: -50.928666 |