Full-text search in databases
To learn how to search outside databases, see the search section in this documentation.
You can search for data in your databases or in a group of databases without knowing data exact location.
Search for data in databases, schemes, and separate tables
In the Database tool window (View | Tool Windows | Database ), 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.
Right-click the selection and select Full-text search. Alternatively, press Ctrl+Alt+Shift+F.
In the search field of the Full-text Search dialog, type your search request and press Search.
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.
Gif
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 ({0}) pane.
Full-text search options
note
PrerequisitesIn the search field of the Full-text Search dialog, type your search request and
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 ![]() |
Starts with | Searches for a given combination of characters in the word beginning. For example, if you search for ![]() |
Ends with | Searches for a given combination of characters in the word beginning. For example, if you search for ![]() |
Matches | Searches for an exact combination of characters. For example, if you search for ![]() |
LIKE pattern | Searches for a combination of characters and SQL wildcards. For example, you can search for ![]() |
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 a number of found results for a table or a view. |
Targets | Shows a list of databases or database objects where you perfrom your search. |