Docs
Components
Refinement Facets
Numeric Menu

Numeric Menu

Numeric Menu is a widget that displays a list of numeric filters in a list. The filter options are part of the configuration and enabled / disabled based on the current search results.

Setup

The following document indexed in Elasticsearch:

{
  "brand": "Apple",
  "product": "Macbook Pro 14",
  "price": 2000
}

Searchkit Setup

setup the following facet_attributes

{
  facet_attributes: [
    { 
      attribute: 'price', 
      field: 'price',  // field must be a numeric type field
      type: 'numeric' 
    }
  ]
}
 

Nested Fields

You can also use nested fields to define facet attributes. This is useful for when you need to perserve object relationships. Read more about nested fields here

Documentation


Apache 2.0 2024 © Joseph McElroy.
Need help? Join discord