Search
In Forest Admin, pages that show lists of records have a free-text search bar on top of them.

A search bar on the main Table View
2 search modes are supported: "normal" and "extended".
- All searches start by being a "normal" search.
- If the records users are looking for are not found, it is possible to trigger an "extended" search from the footer.

Extended search call to action
Natively, the search behavior is to seek value occurrences within columns of the Collection (in normal mode), and columns of the Collections of direct relations (in extended mode).
By default, Forest Admin will search only in specific columns, depending on their type:
Column Type | Default search behavior |
---|---|
Enum | Column is equal to the search string (case-insensitive). |
Number | Column is equal to the search string (if the search string is numeric). |
String | Column contains the search string (case-insensitive). |
Uuid | Column is equal to the search string. |
Other types | Column is ignored by the default search handler. |
You may want to change how the search behaves in your admin panel.
For instance:
- search only on the columns that are relevant to your use case.
- use full-text indexes (i.e. Postgres
tsquery
andtsvector
, Algolia, Elastic search, ...)
In this example, we use the
searchExtended
condition to toggle between case-sensitive and insensitive searches.If your data is indexed using a SaaS, an external store, or a full-text index, you can call it in the search handler.
Last modified 1mo ago