Save a query
A saved query is a portable collection of query text and filters that you can reuse in Discover, Visualize, and Dashboard. Save a query when you want to:
- Retrieve results from the same query at a later time without having to reenter the query text, add the filters or set the time filter
- View the results of the same query in multiple apps
- Share your query
Saved queries don’t include information specific to Discover, such as the currently selected columns in the document table, the sort order, and the index pattern. If you want to save your current view of Discover for later retrieval and reuse, create a saved search instead.
Read-only access
If you have insufficient privileges to save queries, the Save current query button isn’t visible in the saved query management popover. For more information, see Granting access to Kibana
Save a query
To save the current query text, filters, and time filter:
- Click # in the search bar, next to the query text input.
Click Save current query in the popover.
Enter a name, a description, and then select the filter options that you want to include. By default, filters are automatically included, but the time filter is not.
Click Save.
Load a query
To load a saved query into Discover, Dashboard, or Visualize:
- Click # in the search bar, next to the query text input.
- Select the query you want to load. You might need to scroll down to find the query you are looking for.
Save changes to a query
If you load a query and then make changes to the query text, the filters, or the time filter, you can save the changes as a new query or update the existing query.
To save the changes as a new query:
- Click # in the search bar, next to the query text input.
- Click Save as new in the popover.
- Enter a name and a description, and then select the filter options that you want to include.
Click Save.
To save the changes to the current query:
- Click # in the search bar.
- Click Save changes in the popover.
- Enter a description, and then select the filter options that you want to include.
- Click Save.
Clear a query
To clear a query that is currently loaded in an application:
- Click # in the search bar.
- Click Clear in the popover.
Delete a query
To completely delete a query:
- Click # in the search bar, next to the query text input.
- Hover over the query you want to delete.
Click the trash can icon.
You can import, export, and delete saved queries from Saved Objects in Management.