**Discover** is a tool for exploring your data in OpenSearch Dashboards. You can use **Discover** to visually represent your data on a dashboard and provide a high-level view of key metrics.
Data must be added to OpenSearch before it can be analyzed. In this tutorial, you'll use the sample data. To learn about importing your own data, see [Managing indexes]({{site.url}}{{site.baseurl}}/im-plugin/index/).
1. On the OpenSearch Dashboards home page, choose **Add sample data**.
2. Choose the desired sample data and select the **Add data** button. A screenshot of the **Add sample data** interface is shown in the following image.
3. Select the calendar icon ({::nomarkdown}<imgsrc="{{site.url}}{{site.baseurl}}/images/icons/calendar-oui.png"class="inline-icon"alt="calendar icon"/>{:/}) to change the time range of your search and then select **Refresh**.
You'll see a view similar to the one in the following image.
<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">
The document table contains document data. Each row represents a single document, and each column contains a different document field representing metrics such as flight destination, average ticket price, and flight delay. You can add, delete, or modify data fields in a document table as needed to meet your data analysis requirements.
1. View the data fields listed under **Available fields** and select the plus icon ({::nomarkdown}<imgsrc="{{site.url}}{{site.baseurl}}/images/icons/plus-icon.png"class="inline-icon"alt="plus 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. To arrange or sort the columns, select **Sort fields** > **Pick fields to sort by** and then drag and drop the fields in the order you want them to be ordered.
You'll see a view similar to the one in the following image.
<imgsrc="{{site.url}}{{site.baseurl}}/images/dashboards/add-data-fields.png"alt="Discover interface showing adding and sorting data fields"width="700">
1. From the data table's left-side column, choose the inspect icon ({::nomarkdown}<imgsrc="{{site.url}}{{site.baseurl}}/images/icons/inspect-icon.png"class="inline-icon"alt="inspect icon"/>{:/}) to open the **Document Details** window. Select the minimize icon ({::nomarkdown}<imgsrc="{{site.url}}{{site.baseurl}}/images/icons/minimize-icon.png"class="inline-icon"alt="minimize icon"/>{:/}) to close the **Document Details** window.
2. Review the data details. 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.
You'll see a view similar to the one in the following image.
You can use the search toolbar or enter a [DQL]({{site.url}}{{site.baseurl}}/dashboards/discover/dql/) query using the **DevTools** console to search data. While the search toolbar is best for basic queries, such as field name queries, DQL is best for complex queries, such as term, string, Boolean, date, range, or nested queries. DQL provides suggestions for fields and operators as you type, helping you build structured queries.
2. Select the **Update** button to the right of the search bar.
3. Enter a more complex query in the DQL search bar, and then select **Update**. For example, enter `FlightDelay:true AND FlightDelayMin >= 60`, which searches the data for flights delayed by 60 minutes or more.
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.
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 the filter, choose the cross icon ({::nomarkdown}<imgsrc="{{site.url}}{{site.baseurl}}/images/icons/cross-icon.png"class="inline-icon"alt="cross icon"/>{:/}) next to the filter name.
1. Select the inspect icon ({::nomarkdown}<imgsrc="{{site.url}}{{site.baseurl}}/images/icons/inspect-icon.png"class="inline-icon"alt="inspect icon"/>{:/}) next to the field you want to visualize.
2. Select the **Visualize** button. The **Visualize** app opens and a visualization is displayed. Learn more about the **Visualize** app and data visualizations in [Building data visualizations]({{site.url}}{{site.baseurl}}/dashboards/visualize/viz-index/).
<imgsrc="{{site.url}}{{site.baseurl}}/images/dashboards/visualization-flight.png"alt="Data visualization of flight sample data field destination"width="700"/>
You can set alerts to notify you when your data changes beyond the thresholds you define. To learn more about using **Discover** to create and manage alerts, see [Alerting dashboards and visualizations]({{site.url}}{{site.baseurl}}/observing-your-data/alerting/dashboards-alerting/).