-
Notifications
You must be signed in to change notification settings - Fork 507
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
Filtering search results documentation addition #7667
Conversation
This is ready for a review @hdhalter |
@rishabhmaurya , can you please do a tech review? Thank you. |
@leanneeliatra Please tag me for a doc review because this OpenSearch Dashboards content. Thank you. |
LGTM! |
|
||
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
- DQL or Lucene in the query bar
- The Filter button which provides both a form to create a new filter and an advanced view to enter Query DSL directly
- The timerange picker
Its also worth calling out what you mean by search here since thats discover
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this 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?
|
||
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to the Query DSL section here (maybe specifically to https://opensearch.org/docs/latest/query-dsl/query-filter-context/#filter-context and https://opensearch.org/docs/latest/query-dsl/compound/bool/)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
@vagimeli please review this at your nearest convenience. Thank you. |
Signed-off-by: Melissa Vagi <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[email protected]>
There was a problem hiding this 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
My mistake, I see the pages are there for Dashboards now as you have linked them. Thanks @vagimeli |
Closing this PR. |
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
For more information on following Developer Certificate of Origin and signing off your commits, please check here.