
“Cheap” presumably isn’t a value of any attribute of the indexed products. You can set a rule to properly handle a query phrase entered by the customer. Filtering will be used to ensure that only products that meet the “cheap” requirement are returned. The range considered cheap depends on your business, but for the purpose of this example let’s consider any price below $50 cheap. We will set a rule, where if the word “cheap” appears in the query the returned products will be filtered to the ones that have prices of $50 or less.  

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/aisearchblog6.png" alt="The query rule view before changing its default settings" class="full" >
<figcaption>The query rule view before changing its default settings</figcaption>
</figure>

## Requirements
---

- The Search Engine must be enabled for your workspace.
- The "price" attribute must be added to filterable attributes.


## How to do it
---

1. Go to **AI Hub > Indexes**. 
2. Choose the **Index** for which you want to apply the rule.
3. Go to the **Rules** tab.
4. Click **Add rule**.
5. In the **Conditions** section click the **Define** button.
6. The **Query** option is selected by default. From the **If query** dropdown menu, select **contains**.
7. In the **Phrase** input, type `cheap`. 
8. Click **Apply**.
9. In the **Consequences** section, click the **Define** button.
10. Click **Add consequence** and from the dropdown menu choose **Filter query results**.
11. Click **Add filter** and from the dropdown menu choose the attribute that contains the price of your products.
12. From the dropdown menu to the right of the attribute, choose **Less than or equals**. 
13. In the next input, specify the maximum price of items displayed in the search results. In our example, it is 50. 
14. Click **Apply**.
15. Optionally, you can schedule your rule to be active from a start date to an end date. To do so, click **Define** in the **Schedule** section. Otherwise, your rule will be active immediately, with no end date. 
16. In the top left corner of the screen, name your rule. 
17. In the top right corner of the screen, click **Save & Publish** button. 


## Check the use case set up on the Synerise Demo workspace
---
You can check the [query rules settings](https://app.synerise.com/ai-v2/search/indices/98167fa2726dc2460deb41870c0e6d1c1729168383/query-rules/35414) directly in Synerise Demo workspace.

If you’re our partner or client, you already have automatic access to the **Synerise Demo workspace (1590)**, where you can explore all the configured elements of this use case and copy them to your workspace.  

If you’re not a partner or client yet, we encourage you to fill out the contact [form](https://demo.synerise.com/request) to schedule a meeting with our representatives. They’ll be happy to show you how our demo works and discuss how you can apply this use case in your business. 

## Read more
---
Read more about [rules](/docs/ai-hub/ai-search/query-rules).
 
