# Full-text search in databases

> **TL;DR**
> For more information about searching outside databases, refer to  [the search section in this documentation](finding-and-replacing-text-in-file.html) .

You can search for data in your database or in a group of databases without knowing the exact location of data.

Procedure: Search for data in databases, schemes, and separate tables

1. In the   Database   tool window ,  select objects in which you want to perform your search. You can select a database or a group of databases, a scheme or schemes, or even separate tables.

2. Right-click the selection and select `Tools | Full-Text Search`. Alternatively, press `Ctrl+Alt+Shift+F` (Windows), `⌘ ⌥ ⇧ F` (macOS), `⌘ ⌥ ⇧ F` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ⇧ F` (macOS System Shortcuts), `Ctrl+Alt+Shift+F` (XWin), `Ctrl+Alt+Shift+F` (GNOME), `Ctrl+Alt+Shift+F` (KDE), `Ctrl+Alt+Shift+F` (Emacs), `Ctrl+Alt+Shift+F` (Sublime Text), `⌘ ⌥ ⇧ F` (Sublime Text (macOS)), `Ctrl+Alt+Shift+F` (NetBeans), `Ctrl+Alt+Shift+F` (Visual Studio), `⌘ ⌥ ⇧ F` (Visual Studio (macOS)), `Ctrl+Alt+Shift+F` (Eclipse), `⌘ ⌥ ⇧ F` (Eclipse (macOS)).

3. In the search field of the Full-text Search dialog, type your search request and click Search.

4. In the Find tool window, review search results. To open a database object, double-click it. To return to the Find tool window (`View | Tool Windows | Find`), press `Alt+3` (Windows), `⌘ 3` (macOS), `⌘ 3` (IntelliJ IDEA Classic (macOS)), `⌘ 3` (macOS System Shortcuts), `Alt+3` (XWin), `Alt+3` (GNOME), `Alt+3` (KDE), `Alt+3` (Emacs), `Alt+3` (Sublime Text), `⌘ 3` (Sublime Text (macOS)), `Alt+Shift+U` (NetBeans), `Alt+3` (Visual Studio), `⌘ 3` (Visual Studio (macOS)), `Alt+3` (Eclipse), `⌘ ⌥ Q, S` (Eclipse (macOS)).

[Video](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_full_text_search.mp4)

> **Tip:**
> To pin the tab with search results, right-click the tab and select Pin Tab.

> **Note:**
> For Apache Cassandra, IntelliJ IDEA creates several queries for one table because the database does not support the OR condition. You can preview all searching statements in the Preview (data_source_name) pane.

## Full-text search options

| Option | Description |
| --- | --- |
| Match case | Searches only for those instances that are written the same way as the query (preserving the case). A search for `Index` will return `Index`, `Indexes`, `Indexing` but not `index`. |
| Contains | Searches for a given combination of characters in words. For example, if you search for `ETTE`, you receive all `LIKE '%ETTE%'` results (`ANNETTE`, `JEANETTE`, `GILLETTE`, `BETTE`) from all the columns.     ![Search anywhere in string](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_full_text_search_anywhere.png)  |
| Starts with | Searches for a given combination of characters in the word beginning. For example, if you search for `JO`, you receive all `LIKE 'JO%'` results (`JOHNSON`, `JONES`, `JOYCE`, `JOAN`) from all the columns.     ![Prefix search](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_full_text_search_prefix.png)  |
| Ends with | Searches for a given combination of characters in the word beginning. For example, if you search for `TIN`, you receive all `LIKE '%TIN'` results (`MARTIN`, `AUSTIN`, `KRISTIN`, `JUSTIN`) from all the columns.     ![Suffix search](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_full_text_search_suffix.png) |
| Matches | Searches for an exact combination of characters. For example, if you search for `DAVIS`, you receive all `LIKE 'DAVIS'` results `DAVIS` from all the columns.     ![Full match search](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_full_text_search_full_match.png) |
| LIKE pattern | Searches for a combination of characters and [SQL wildcards](https://www.w3schools.com/sql/sql_wildcards.asp). For example, you can search for `a_%_%` and find any `LIKE 'a_%_%'` results that start with `a` and have at least three characters in length `ANDERSON`, `ALLEN`, `AMY`, `ANNA`.     ![LIKE pattern search](https://resources.jetbrains.com.cn/help/img/idea/2026.2/db_full_text_search_like_pattern.png)  |
| Text columns | Searches only in columns that support the LIKE operation. For example, CHAR, VARCHAR, TINYTEXT, TEXT, and DATE (Oracle). |
| Only columns with full-text search indexes | Searches only in columns that have a created index. This feature is supported only for PostgreSQL, MySQL, and MariaDB. The query for PostgreSQL is `where col @@ plainto_tsquery('query')`. The query for MySQL and MariaDB is `where match(col) against ('query' in natural language mode)`. |
| Numeric columns | Searches only in columns with the numeric data type like INT, MEDIUMINT, SMALLINT, BIGINT, and others. |
| All columns | Searches in all types of columns. For example, you can run this search to find a JSON element. |
| Show first N matches per table/view | Limits the number of found results for a table or a view. |

