# Restricting Search

**URL:** <https://community.forestadmin.com/t/restricting-search/248>\
**Category:** Help me!\
**Created:** [May 19, 2020, 10:17pm UTC](https://community.forestadmin.com/t/restricting-search/248 "2020-05-19T22:17:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liam\_Cheung](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/liam_cheung/32/140_2.png) [@Liam\_Cheung](https://community.forestadmin.com/u/Liam_Cheung)\
**Post date:** [May 19, 2020, 10:17pm UTC](https://community.forestadmin.com/t/restricting-search/248/1 "2020-05-19T22:17:43Z")

</div>

Trying to restrict search options in UI. Adding these option to a Mongoose collection:  
collection(‘users’, {  
isSearchable: false,  
searchFields: [‘id’, ‘email’, ‘createdAt’, ‘updatedAt’],

## Expected behavior

According to [https://docs.forestadmin.com/documentation/how-tos/settings/restrict-the-search-on-specific-fields](https://docs.forestadmin.com/documentation/how-tos/settings/restrict-the-search-on-specific-fields) at least I should not have the ability to search on other fields.

I would also want the extended search to be disabled

## Actual behavior

UI appears with full test search and filter allows selection of any field and will filter based on any field.

## Context

Please provide any relevant information about your setup.

- Package Version: 6.1.4
- Express Version:4.17.1
- Sequelize Version:
- Database Dialect: MongoDB
- Database Version:
- Project Name:

---

<div class="post-metadata">

**Author:** ![anon94532230](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@anon94532230](https://community.forestadmin.com/u/anon94532230)\
**Post date:** [May 20, 2020, 9:12am UTC](https://community.forestadmin.com/t/restricting-search/248/2 "2020-05-20T09:12:30Z")

</div>

Hello @Liam_Cheung 👋

Welcome to our community 🎊

`isSearchable` only applies to smart collections, that’s why it doesn’t work (you need to disable the search on all fields of a collection to remove the search bar).  
The `searchFields` option does its job on my end 🤔, could you share with us your entire file ?  
For the `filters` you can disable filtering for a field [from the UI](https://docs.forestadmin.com/documentation/v/v5/reference-guide/fields/customize-your-fields#basic-settings).  
Finally, it is not possible to disable extended search at the moment.

---

<div class="post-metadata">

**Author:** ![Liam\_Cheung](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/liam_cheung/32/140_2.png) [@Liam\_Cheung](https://community.forestadmin.com/u/Liam_Cheung)\
**Post date:** [May 20, 2020, 2:22pm UTC](https://community.forestadmin.com/t/restricting-search/248/3 "2020-05-20T14:22:56Z")

</div>

Great thanks I misunderstood how it worked, I get it now and works great.

---

<div class="post-metadata">

**Author:** ![anon94532230](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@anon94532230](https://community.forestadmin.com/u/anon94532230)\
**Post date:** [May 20, 2020, 2:41pm UTC](https://community.forestadmin.com/t/restricting-search/248/4 "2020-05-20T14:41:40Z")

</div>

Glad to hear that 🙂
