Skip to content
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

Understand Discover -- (draft) #3112

Closed
ananzh opened this issue Dec 20, 2022 · 1 comment
Closed

Understand Discover -- (draft) #3112

ananzh opened this issue Dec 20, 2022 · 1 comment
Labels
discover for discover reinvent research

Comments

@ananzh
Copy link
Member

ananzh commented Dec 20, 2022

Discover is an internal plugin in OpenSearch Dashboards core. There are three major functions:

  • Select data for your exploration, and then set a time range for that data, search it with the OpenSearch Dashboards Query Language, and filter the results.
  • Explore the details of your data, view individual documents, and create tables that summarize the contents of the data.
  • Present your findings in a visualization.

Required plugins

  • charts
  • data: access data from OpenSearch. discover uses data plugin to do filter query and search.
    • $scope.searchSource: construct and run search
    • data.query: construct and run filters, time range query, match query and etc
      • data.query.state
      • data.query.filterManager: manager filters
      • data.query.queryString: query string
      • data.query.timefilter: time range filter
    • autocomplete wired in TopNavMenu
  • embeddable
  • inspector
  • opensearchDashboardsLegacy
  • urlForwarding: redirect and navigate to legacy url
  • navigation: provide TopNavMenu component
  • uiActions
  • visualizations: create histogram for aggregate data
  • opensearchDashboardsUtils: state manager and state sync service
  • home
  • savedObject*: loading and saving. discover uses savedObject plugin to save search.
    • a saved object type, called searchSavedObjectType
    • a saved object class, called SavedSearch, with all convenient functions
  • opensearchDashboardsReact

Setup and Start Discover

Server

Setup discover

Start discover

discover-setup-start

Public

Public setup and start are very similar to OSD server. The entry point is changed to src/core/public/osd_bootstrap.ts. The major difference is that public setup doesn’t need to build the plugin dependency tree.

Core functions

Set data

  • Open the main menu. On the navigation, click discover.
  • Click the button and set the data.
  • Set the time range.

Screen Shot 2022-07-13 at 08 53 28

Explore data fields

  • Check the available fields in the left side bar. Try search a field by its name.

Screen Shot 2022-07-12 at 23 32 36

  • Click a field and view the top values.

Screen Shot 2022-07-12 at 23 33 16

  • Click + button to add the field to Selected fields. Meanwhile, see the doc table changes on the right.

Screen Shot 2022-07-12 at 23 33 43

* Each doc table columns on the right has a column header. Column header is able to sort data or remove column.

Search data

Discover can do various types of search using DQL, such as term query, string query, boolean query, date/range query and nested query. To search all fields, enter a string in the Search field. To do a more complicated search, use DQL.

  • Enter a search and click Update.

Screen Shot 2022-07-14 at 10 28 29

Filter data

  • Click Add filter.

Screen Shot 2022-07-14 at 09 16 05

  • Set filter. Below is an example.

Screen Shot 2022-07-14 at 09 15 50

* Save filter. * Remove a filter by clicking the `x` button.

Screen Shot 2022-07-14 at 09 16 44

Explore document

  • Click the expand button on the left of the table row to view a document with details.

Screen Shot 2022-07-03 at 14 05 31

  • Click Table/JSON tab, will show a table/JSON view.

Screen Shot 2022-07-03 at 14 08 36

  • Filter in/out a value

Re-use search result (savedSearch)

  • Click Save in the top navigation to save your search. Click Open to open an existed one.

Screen Shot 2022-07-14 at 09 25 42

* Enter a title to save. * Re-use your discover and filter * In saved objects, open saved discover * In dashboards, add saved discover ( doc views) * In visualize, create a visualization using saved discover filter.

Visualize field

If a data field can be summarized as metrics, statistics, or other analytics (aggregation), discover allows you visualize it. Click the visualize button. You will be directed to a visualization.
Screen Shot 2022-07-04 at 15 11 48 2

@ananzh
Copy link
Member Author

ananzh commented Apr 11, 2023

We have decided to replace Discover. This might just be a reference for document. Close it for now.

@ananzh ananzh closed this as completed Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discover for discover reinvent research
Projects
None yet
Development

No branches or pull requests

1 participant