To analyze your data in OpenSearch and visualize key metrics, you can use the **Discover** application in OpenSearch Dashboards. An example of data analysis in **Discover** is shown in the following image.
- Add sample data or import your own data into OpenSearch. Go to the [OpenSearch Dashboards quickstart guide]({{site.url}}{{site.baseurl}}/dashboards/quickstart/) to learn about adding sample datasets. Go to [Managing indexes]({{site.url}}{{site.baseurl}}/im-plugin/index/) to learn about importing your own data.
- Have a foundational understanding of [OpenSearch documents and indexes]({{site.url}}{{site.baseurl}}/im-plugin/index/).
3. Select the {::nomarkdown}<imgsrc="{{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**.
<imgsrc="{{site.url}}{{site.baseurl}}/images/dashboards/define-search.png"alt="Discover interface showing search of flight sample data for Last 7 days"width="700">
In OpenSearch, a document table stores unstructured data. In a document table, each row represents a single document, and each column contains document attributes.
1. From the data table's left column, choose the {::nomarkdown}<imgsrc="{{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}<imgsrc="{{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.
1. View the data fields listed under **Available fields** and select the {::nomarkdown}<imgsrc="{{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.
You can use the search toolbar to enter a [DQL]({{site.url}}{{site.baseurl}}/dashboards/discover/dql/) or [query string]({{site.url}}{{site.baseurl}}/query-dsl/full-text/query-string/) query. The search toolbar is best for basic queries; for full query and filter capability, 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/).
Filters allow you to narrow the results of a query by specifying certain criteria. You can filter by field, value, or range. The **Add filter** pop-up suggests the available fields and operators.
4. To remove a filter, choose the {::nomarkdown}<imgsrc="{{site.url}}{{site.baseurl}}/images/icons/cross-icon.png"class="inline-icon"alt="cross icon"/>{:/} icon to the right of the filter name.
The resulting view is shown in the following image.
<imgsrc="{{site.url}}{{site.baseurl}}/images/dashboards/discover-filter.png"alt="Visualize data findings interface"width="700"/>
1. Select the {::nomarkdown}<imgsrc="{{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.
<imgsrc="{{site.url}}{{site.baseurl}}/images/dashboards/visualization-flight.png"alt="Data visualization of flight sample data field destination"width="700"/>
Set alerts to notify you when your data exceeds your specified thresholds. Go to [Alerting dashboards and visualizations]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/dashboards-alerting/) to learn about creating and managing alerts.