-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add type attribute to search query record #157
Conversation
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Overall, it looks good. My only question is whether the "group_by" type will be displayed on the dashboard for grouped entries. Currently, we only have similarity, but if we add other grouping mechanisms in the future, the dashboard should clearly indicate the type of grouping. For example, it should distinguish whether the group is related by similarity or by some other criteria. In that case, we could use more descriptive labels like Another consideration is whether we’re only distinguishing between two options—individual queries and groups. If that’s the case, a boolean flag might be sufficient instead of using a string. Alternatively, if we need to handle groups differently on the dashboard, we could use an explicit flag, like:
|
Yes, we will aim to display this on the dashboard.
IMO Would be good to explicitly mention |
I think we should make the labels here more descriptive so the dashboard can use them directly without any translation. If we only have |
This change is not to indicate the grouping type. the grouping type is already stored and can be retrieved from the cluster settings on the UI. This changes is to denote whether the searchqueryrecord entry (in local index or dashboard) is a group entry or a query entry. This will be useful while querying and filtering. |
@dzane17 Please take a look at these UX screens for more details : opensearch-project/query-insights-dashboards#14 |
src/main/java/org/opensearch/plugin/insights/core/listener/QueryInsightsListener.java
Outdated
Show resolved
Hide resolved
I'm fine with either displaying only "group" or more detailed "group by " on the overview page. IMO the pro of adding the dimensions here is it can give us extra information thus I think it could be a better way. Let's check with the ux team on this as well. They should be able to give us suggestions from the end user's experience perspective. |
Cluster settings will only tell us the current group_by setting. We don't know the value for historical data. |
Yes my bad, I thought we can get this from the measurements object where aggregation type will give us NONE or AVERAGE. However, this is not extensible if we add more grouping mechanisms in the future. Would be good to store the following:
|
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
5c723db
to
528dfe4
Compare
LGTM, merging the PR now! |
* Add type attribute to search query record Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com> * Make type attribute enum Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com> * Use group_by attribute Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com> --------- Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com> (cherry picked from commit b5e2d07) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Add
group_by
attribute to search query record to differentiate betweenquery
andgroup
.group_by
= none fortype
=query
This is needed when displaying queries and groups together on the QI dashboards as part of the Top N query groups feature.
Note:
type
will be inferred from group_by and we will be able to filter the table usingtype
.type
will have valuesquery
orgroup
.Added unit tests to cover this change.
Issues Resolved
Addresses: opensearch-project/query-insights-dashboards#14
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.