# Is it possible to limit search fields for a collection using forest-express-sequelize?

**URL:** <https://community.forestadmin.com/t/is-it-possible-to-limit-search-fields-for-a-collection-using-forest-express-sequelize/7855>\
**Category:** Help me!\
**Tags:** howtos\
**Created:** [February 12, 2025, 6:19pm UTC](https://community.forestadmin.com/t/is-it-possible-to-limit-search-fields-for-a-collection-using-forest-express-sequelize/7855 "2025-02-12T18:19:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brett\_Belka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/brett_belka/32/4807_2.png) [@Brett\_Belka](https://community.forestadmin.com/u/Brett_Belka)\
**Post date:** [February 12, 2025, 6:19pm UTC](https://community.forestadmin.com/t/is-it-possible-to-limit-search-fields-for-a-collection-using-forest-express-sequelize/7855/1 "2025-02-12T18:19:06Z")

</div>

## Feature(s) impacted

Search bar

## Observed behavior

When a term is typed into the search bar, it searches every field in every record.

## Expected behavior

Limit the search to commonly searched fields, omitting extraneous fields.

## Context

We found [this documentation](https://docs.forestadmin.com/cloud/code-customization/collections/search) for doing it using the Agent but we are still using forest-express-sequelize (no desire or bandwidth to upgrade). Is it possible with forest-express-sequelize?

- Project name: Scratch Payment Service
- Team name: All
- Environment name: All
- Agent technology: nodejs
- Agent (forest package) name & version: “forest-express-sequelize”: “9.3.9”
- Database type: Postgres and Mysql
- Recent changes made on your end if any: None.

---

<div class="post-metadata">

**Author:** ![Brett\_Belka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/brett_belka/32/4807_2.png) [@Brett\_Belka](https://community.forestadmin.com/u/Brett_Belka)\
**Post date:** [February 12, 2025, 7:18pm UTC](https://community.forestadmin.com/t/is-it-possible-to-limit-search-fields-for-a-collection-using-forest-express-sequelize/7855/2 "2025-02-12T19:18:22Z")

</div>

cc: @anon39848301- you’re usually a great resource…

---

<div class="post-metadata">

**Author:** ![Romain\_Gilliotte](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/romain_gilliotte/32/6585_2.png) [@Romain\_Gilliotte](https://community.forestadmin.com/u/Romain_Gilliotte)\
**Post date:** [February 12, 2025, 9:44pm UTC](https://community.forestadmin.com/t/is-it-possible-to-limit-search-fields-for-a-collection-using-forest-express-sequelize/7855/3 "2025-02-12T21:44:58Z")

</div>

Hi

Would this suit your need?

> **[Performance | Developer Guide](https://docs.forestadmin.com/documentation/reference-guide/performance#restrict-search-on-specific-fields)**
>
> Loading performance is key to streamlining your operations. Here are a few steps we recommend taking to ensure your Forest is optimized.

```javascript
const { collection } = require('forest-express-sequelize');
​
collection('companies', {
  searchFields: ['name', 'industry'],
});

```

---

<div class="post-metadata">

**Author:** ![Brett\_Belka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/brett_belka/32/4807_2.png) [@Brett\_Belka](https://community.forestadmin.com/u/Brett_Belka)\
**Post date:** [February 13, 2025, 3:34pm UTC](https://community.forestadmin.com/t/is-it-possible-to-limit-search-fields-for-a-collection-using-forest-express-sequelize/7855/4 "2025-02-13T15:34:43Z")

</div>

@Romain_Gilliotte that looks to be it. Thanks!
