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

Filtering search results documentation addition #7667

Conversation

leanneeliatra
Copy link
Contributor

Description

Adding a new page to the documentation for Filtering Search Results in OpenSearch Dashboards

Issues Resolved

Part of #7507

Version

all

Frontend features

If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional.
Do I need to address this? Please inform

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@leanneeliatra
Copy link
Contributor Author

This is ready for a review @hdhalter

@hdhalter
Copy link
Contributor

@rishabhmaurya , can you please do a tech review? Thank you.

@vagimeli
Copy link
Collaborator

@leanneeliatra Please tag me for a doc review because this OpenSearch Dashboards content. Thank you.

@rishabhmaurya
Copy link
Contributor

LGTM!
@hdhalter let's add someone from dashboard team to review as it is more about dashboard behaviour.

_search-plugins/searching-data/filtering-search-results.md Outdated Show resolved Hide resolved

1. Navigate to the OpenSearch Dashboards UI.
2. Click on `Discover` in the sidebar.
3. Choose `opensearch_dashboards_sample_data_flights` from the index pattern selector.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be more generic and also point them to the page on how to create an index patter. A user might not have installed the flights sample dataset. By default they dont have any sample datasets installed and even if they do manually add them, they will not add all.

Copy link
Collaborator

@vagimeli vagimeli Jul 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See additions at line 16

2. Click on `Discover` in the sidebar.
3. Choose `opensearch_dashboards_sample_data_flights` from the index pattern selector.

### Example: Filter by destination airport
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshots will be really useful here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added


This will display only the flights that have been cancelled with a destination of Zurich Airport in the last 100 days.

## Using Query DSL for advanced filtering
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can actually do this in the query bar too. See the Edit as Query DSL below.
Screenshot 2024-07-11 at 10 26 50 AM

Copy link
Collaborator

@vagimeli vagimeli Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Dev Tools capabilities with examples are in https://opensearch.org/docs/latest/dashboards/dev-tools/index-dev/. @ashwin-pc Do you have a demo that I can use to focus on using the query bar?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One key missing this here is that DQL is a filtering language for OpenSearch Dashboards. I would not mention anything about Dev Tools here since all fintering today can be done without ever needing to go there. There are 3 main ways to filter in OSD.

  1. DQL or Lucene in the query bar
  2. The Filter button which provides both a form to create a new filter and an advanced view to enter Query DSL directly
  3. The timerange picker

Its also worth calling out what you mean by search here since thats discover

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Ashwin. I am addressing your comments and adding in you suggestions. My question would be in relation to 'Its also worth calling out what you mean by search here since thats discover', are you referring to a specific part here?
Thanks.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ashwin-pc @leanneeliatra We already have this documentation in https://opensearch.org/docs/latest/dashboards/discover/index-discover/. Is there a reason for this PR? If we need more comprehensive information about Query DSL using the query bar in Discover, then we should add to the existing doc. If I'm misunderstanding the purpose of this doc, then please clarify what the purpose of this doc is. Thank you.

cc: @hdhalter

Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this to the Dashboards section. @vagimeli Could you review this PR when it's ready for doc review?

_search-plugins/searching-data/filtering-search-results.md Outdated Show resolved Hide resolved
_search-plugins/searching-data/filtering-search-results.md Outdated Show resolved Hide resolved

OpenSearch Query DSL (Domain Specific Language) allows for more complex and powerful queries. You can combine multiple conditions and use advanced logic to filter data.

### Example of Query DSL filtering
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove this section. There already is info about filtering here https://opensearch.org/docs/latest/query-dsl/query-filter-context/#filter-context

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised to address @ashwin-pc comment re: option to use the Discover application

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thank you @vagimeli


## Using Query DSL for advanced filtering

OpenSearch Query DSL (Domain Specific Language) allows for more complex and powerful queries. You can combine multiple conditions and use advanced logic to filter data.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@leanneeliatra
Copy link
Contributor Author

@leanneeliatra Please tag me for a doc review because this OpenSearch Dashboards content. Thank you.

@vagimeli please review this at your nearest convenience. Thank you.

@hdhalter hdhalter assigned vagimeli and unassigned rishabhmaurya Jul 16, 2024
@hdhalter hdhalter added 4 - Doc review PR: Doc review in progress and removed 3 - Tech review PR: Tech review in progress labels Jul 16, 2024
Copy link
Collaborator

@vagimeli vagimeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ashwin-pc We already have documentation about searching and filtering with Discover https://opensearch.org/docs/latest/dashboards/discover/index-discover/#searching-data. Do we need this documentation? It seems to be redundant.

If this is supposed to address community feedback about search filtering in OpenSearch core, the Query DSL documentation addresses that topic https://opensearch.org/docs/latest/query-dsl/query-filter-context/.

cc: @hdhalter

@leanneeliatra
Copy link
Contributor Author

leanneeliatra commented Jul 22, 2024

My mistake, I see the pages are there for Dashboards now as you have linked them. Thanks @vagimeli

@hdhalter hdhalter added 2 - In progress Issue/PR: The issue or PR is in progress. and removed 4 - Doc review PR: Doc review in progress labels Jul 22, 2024
@hdhalter
Copy link
Contributor

Closing this PR.

@hdhalter hdhalter closed this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - In progress Issue/PR: The issue or PR is in progress. backport 2.15 security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants