-
Notifications
You must be signed in to change notification settings - Fork 578
Update Discover content for 2.0 features #8177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c72cf75
6f8f1d0
48bfa61
fe2589f
9f891f9
5432c4f
b0b1b2f
438b376
6f1a197
6beaba9
c921d47
268d517
39c5f94
3579519
a8152c5
feb7db8
a390fe2
7cb37bd
0ffbd4d
c0be285
20d4dcf
150aa58
6fc3866
8037daa
387d1c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
layout: default | ||
title: Defining and analyzing searches | ||
parent: Analyzing data | ||
nav_order: 10 | ||
--- | ||
|
||
# Defining and analyzing searches | ||
|
||
The **Discover** application in OpenSearch Dashboards offers a flexible interface for defining and analyzing searches across your data, enabling powerful insights and visualizations. | ||
|
||
## Defining a search | ||
|
||
To define a search, follow these steps: | ||
|
||
1. On the OpenSearch Dashboards navigation menu, select **Discover**. | ||
2. Choose the data you want to work with. In this case, choose `opensearch_dashboards_sample_data_flights` from the upper-left dropdown menu. | ||
3. Select the {::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/icons/calendar-oui.png" class="inline-icon" alt="calendar icon"/>{:/} icon to change the time range of your search and then select **Refresh**. | ||
|
||
## Analyzing document tables | ||
|
||
OpenSearch uses document tables to store unstructured data, where each row corresponds to an individual document and columns represent various document attributes. | ||
|
||
### Viewing document attributes | ||
|
||
To review document attributes, follow these steps: | ||
|
||
1. From the data table's left column, choose the {::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/icons/inspect-icon.png" class="inline-icon" alt="inspect icon"/>{:/} icon to open the **Document Details** window. Select the {::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/icons/minimize-icon.png" class="inline-icon" alt="minimize icon"/>{:/} icon to close the **Document Details** window. | ||
2. Examine the metadata. You can switch between the **Table** and **JSON** tabs to view the data in your preferred format. | ||
3. Select **View surrounding documents** to view data for other log entries either preceding or following your current document or select **View single document** to view a particular log entry. | ||
|
||
### Adding or deleting fields in document tables | ||
|
||
To add or delete fields in a document table, follow these steps: | ||
|
||
1. View the data fields listed under **Available fields** and select the {::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/icons/plus-icon.png" class="inline-icon" alt="plus icon"/>{:/} icon to add the desired fields to the document table. The field will be automatically added to both **Selected fields** and the document table. For this example, choose the fields `Carrier`, `AvgTicketPrice`, and `Dest`. | ||
2. Select **Sort fields** > **Pick fields to sort by**. Drag and drop the chosen fields in the desired sort order. | ||
|
||
## Searching data | ||
|
||
The search toolbar in **Discover** supports both [DQL]({{site.url}}{{site.baseurl}}/dashboards/discover/dql/) and [query string]({{site.url}}{{site.baseurl}}/query-dsl/full-text/query-string/) queries. For more complex queries and full filter capabilities, use [query domain-specific language (DSL)]({{site.url}}{{site.baseurl}}/query-dsl/index/) in the [Dev Tools console]({{site.url}}{{site.baseurl}}/dashboards/dev-tools/index-dev/). | ||
|
||
For more information, see [Discover and Dashboard search toolbar]({{site.url}}{{site.baseurl}}/dashboards/index/#discover-and-dashboard-search-bar). | ||
|
||
## Filtering data | ||
|
||
You can use filters to refine query results by specifying certain criteria such as field, value, or range. The **Add filter** feature provides suggestions for available fields and operators. | ||
|
||
To filter your data, follow these steps: | ||
|
||
1. Under the DQL search bar, choose **Add filter**. | ||
2. Select the desired options from the **Field**, **Operator**, and **Value** dropdown lists. For example, select `Cancelled`, `is`, and `true`. | ||
3. Choose **Save**. | ||
4. To remove a filter, choose the {::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/icons/cross-icon.png" class="inline-icon" alt="cross icon"/>{:/} icon to the right of the filter name. | ||
|
||
## Saving a search | ||
|
||
To save your search, including the query text, filters, and current data view, follow these steps: | ||
|
||
1. Select **Save** on the upper-right toolbar. | ||
2. Add a title, and then choose **Save**. | ||
3. Select **Open** on the upper-right toolbar to access your saved searches. | ||
|
||
## Visualizing data findings | ||
|
||
To visualize your data findings, follow these steps: | ||
|
||
1. Select the {::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/icons/inspect-icon.png" class="inline-icon" alt="inspect icon"/>{:/} icon to the right of the field you want to visualize. | ||
2. Select the **Visualize** button. When the **Visualize** application is launched, a visualization appears. | ||
|
||
## Setting alerts | ||
|
||
Configure alerts to receive notifications when your data exceeds the specified thresholds. For detailed information about setting up and managing alerts, see [Alerting dashboards and visualizations]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/dashboards-alerting/). |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,79 @@ | ||||||
--- | ||||||
layout: default | ||||||
title: Exploring query enhancements | ||||||
parent: Analyzing data | ||||||
nav_order: 20 | ||||||
--- | ||||||
|
||||||
# Exploring query enhancements | ||||||
Introduced 2.18 | ||||||
{: .label .label-purple } | ||||||
|
||||||
Starting with OpenSearch 2.17, query enhancements have been made. These enhancements are experimental and may be subject to change or instability. Enhancements include the following: | ||||||
|
||||||
- Query languages PPL and SQL, with **Query Assist** for PPL | ||||||
- Multiline query editor for PPL and SQL and autocomplete for PPL and DQL | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did we wanted to mention the expand and collapse feature of the query editor? they can go from multiline to a single line There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kavilla Please see revised text. You're welcome to make any necessary changes to the text. Thank you!
vagimeli marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
- Query editor expand/collapse for multiline/single-line mode | ||||||
- **Data Explorer** feature that supports diverse data sources, such as index patterns, indexes, and Amazon S3 connections, with built-in support for selecting the appropriate query language for your chosen data type | ||||||
- OpenSearch Dashboards allows for exploring your data within your indexes without using index patterns | ||||||
- Link sharing through URLs without needing write permission to create an index pattern | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. creating an index pattern with write permission is required which was a blocker for exploring data. non-privileged users would have to depend on someone with permission to create the index pattern for the data to be explored leading to suboptimal index patterns to be created as it would be easier to just do something like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kavilla @sejli Should the link sharing bullet be modified to read: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM, @kavilla? |
||||||
|
||||||
OpenSearch 2.18 builds upon existing features with new query enhancements designed to improve data exploration. However, these enhancements, including PPL and SQL functionality, are not available in minimal distributions and require the separate installation of the [OpenSearch SQL plugin]({{site.url}}{{site.baseurl}}/search-plugins/sql/settings/). | ||||||
|
||||||
While query enhancements work with a standard OpenSearch installation, enabling SQL, PPL, and external data source queries requires additional plugins, particularly the SQL plugin. For optimal use of these query enhancement features, make sure to install the [required plugins]({{site.url}}{{site.baseurl}}/install-and-configure/plugins/) across all relevant data sources. | ||||||
|
||||||
You can leave your feedback at [https://forum.opensearch.org/)](https://forum.opensearch.org/) to help the OpenSearch open source project improve this feature. | ||||||
{: .note} | ||||||
|
||||||
## Enabling query enhancements | ||||||
|
||||||
To enable the query enhancements through OpenSearch Dashboards, follow these steps: | ||||||
|
||||||
1. Go to **Dashboards Management** > **Advanced settings** > **Search** and toggle on **Enable query enhancements**. Tip: You can select the **Search** pane from the **Category** dropdown menu in the upper-right search bar. | ||||||
2. Select the **Save** button to save your changes. | ||||||
3. Reload the page as prompted in the pop-up message. | ||||||
|
||||||
Alternatively, you can override the setting on startup by running the following command: | ||||||
|
||||||
``` | ||||||
./bin/opensearch-dashboards --uiSettings.overrides['query:enhancements:enabled']=true | ||||||
``` | ||||||
{% include copy-curl.html %} | ||||||
|
||||||
## Using the experimental features | ||||||
|
||||||
The following tutorials guide you through some of the experimental features and capabilities. | ||||||
|
||||||
### Query language enhancements | ||||||
|
||||||
You can now use PPL in **Discover**. Follow these steps to try out the feature: | ||||||
|
||||||
1. Go to **Discover** and select **PPL** from the query language dropdown menu in the upper-right search bar. You should see a dashboard containing the query editor, histogram, and data table panes. | ||||||
2. Select a sample dataset. For this example, select `opensearch_dashboards_sample_data_ecommerce` from the data source dropdown menu above the query editor and adjust the time filter to **Last 1 year**. | ||||||
3. Enter the following example PPL query: | ||||||
|
||||||
```json | ||||||
source = opensearch_dashboards_sample_data_logs | ||||||
| where tags = "success" | ||||||
| where geo.dest = "US" | ||||||
``` | ||||||
{% include copy-curl.html %} | ||||||
|
||||||
4. View the resulting output that shows the number of successful log entries originating from the United States. You should see an updated histogram and data table following the query editor. | ||||||
5. Select the **Recent queries** option within the query editor toolbar to display your recent queries. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we mention this available for non-DQL/Lucene queries? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
PPL and DQL provide an autocomplete option that suggests field names, functions, and syntax. | ||||||
|
||||||
|
||||||
## Selecting data sources and data types through the UI | ||||||
|
||||||
You can now select your data sources and types from within the **Discover** dashboard. Follow these steps to try out the feature. | ||||||
|
||||||
1. From the **Discover** page, select a data source from the dropdown menu in the upper toolbar. | ||||||
2. Select the **View all available data** button to display a list of your available data sources. You may need to refresh your page to display any newly added data sources. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: @vagimeli might have better context on the correct terms but worried about saying data sources given some users got confused. They are similar but different. Ideally There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kavilla I'm open to suggestions. Please make a suggested rewrite and I'll accept changes. Thank you. |
||||||
3. Select the desired data source and follow steps displayed in the data sources window to manage your data source. | ||||||
|
||||||
You can now use **Query Assist** with PPL queries. With **Query Assist**, you can ask questions like _Are there any errors in my logs?_. The assistant includes predefined prompts. Follow these steps to try out the feature: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. didn't see it but should we call out that Query Assist for PPL but not necessarily available for all data sources There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kavilla Should we tell user which specific data sources/types it's available for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Query Assist is only available in query enhancements when the data source itself supports it. It's dependent on if the user adds a cluster with query assist enabled/set up. I think we can call out that query assist is required on the OpenSearch data source, something like query assist is available when included data source has it available? |
||||||
|
||||||
1. Select **PPL** from the dropdown menu in the query toolbar. | ||||||
2. Select the {::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/dashboards/query-assist.png" class="inline-icon" alt="query assist icon"/>{:/} icon and choose a predefined question. The resulting output is displaying in the query editor pane. |
Uh oh!
There was an error while loading. Please reload this page.