# Filtering your results

Refining the results of the search is essential for your Menu, for that reason Algolia has provided a straight forward component to build filtering into the search. By using the [`<RefinementList />`](http://algolia.com/doc/api-reference/widgets/refinement-list/react/) component we can achieve that by simply telling it which attribute we want to filter on:

```jsx
<RefinementList attribute="brand" />
```

This component will then render a check box list of the most relevant attributes for the data set being fetched.

The currently available attributes (called 'facets') to filter on are:

```
activities
aggregate_rating
at_visible_store
available_for_delivery
available_for_pickup
available_weights
brand
brand_subtype
bucket_price
category
feelings
kind
percent_cbd
percent_thc
review_count
root_types
store_specific_product
store_types
```

#### Details about specific facets

The majority of the facets are self-explanatory but some of them have more context attached to them. The most important of them being "root\_types".  Root types are the Jane defined "general" categories for our products, as long as their sub\_types written in the format `root_type:root_subtype`. It also includes two other entries: "sale" and "best\_selling"\
\
A list of root\_types can look like:

<div align="left"><figure><img src="/files/KCEV7hxa5Z8eKITMqTGU" alt="" width="224"><figcaption><p>Example of root types</p></figcaption></figure></div>

The **root\_types** are categories that don't include any overrides that are set in the business dashboard. To find the overwritten ones check [Customizing the UI](/jane-docs/implementing-roots/building-your-menu/using-react-and-instant-search/customizing-the-ui.md#custom-labels)

\
Then the "**brand\_subtype**" is a facet worth noting because it is a field set by the product brand itself, meaning we have no control what the values could be for that field. They **are not standarized** as the root types and should not be treated as such

Since this list may be updated at any time, a better way of knowing which attributes are currently available is to follow the instructions on <https://docs.iheartjane.com/new-jane-roots-docs/implementing-roots/building-your-menu/using-other-technologies/searching-and-filtering#filtering>

By default the items are ordered based on the quantity of results of that attribute but can be changed with the prop `transformItems`. Also by default, the filter works with a logical `or`, in case you need a filter to be a logical `and` that can be updated with the `operation` prop.

```jsx
<InstantSearch {...}>
  <RefinementList
   transformItems={(items) => orderBy(items, "label", "asc")}
   attribute="feelings"
   operator="and"
  />
</InstantSearch>
```

Which renders a filter like:\
![](/files/jxB9bVRG2nz33izZExwm)

In this example, let's say a user selects two feelings (for example "Relaxed" and "Cheerful") from the menu, the results will include only products that have both feelings attached ("Relaxed" AND "Cheerful").&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iheartjane.com/jane-docs/implementing-roots/building-your-menu/using-react-and-instant-search/filtering-your-results.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
