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

remove records with grouping #26

Merged

Conversation

ansjcy
Copy link
Member

@ansjcy ansjcy commented Nov 7, 2024

Description

Remove records with grouping enabled

Testing

  • enable top queries with group by similarity
  • send the same search queries and check UI, there's no rows.
image - Check API response, the query groups are returned correctly
➜  ~ curl -X GET "localhost:9200/_insights/top_queries?pretty"
{
  "top_queries" : [
    {
      "timestamp" : 1730939434086,
      "task_resource_usages" : [
        {
          "action" : "indices:data/read/search[phase/query]",
          "taskId" : 336,
          "parentTaskId" : 335,
          "nodeId" : "GMGKkdcNTzCi2f_ZTanWQg",
          "taskResourceUsage" : {
            "cpu_time_in_nanos" : 3696000,
            "memory_in_bytes" : 34544
          }
        },
        {
          "action" : "indices:data/read/search",
          "taskId" : 335,
          "parentTaskId" : -1,
          "nodeId" : "GMGKkdcNTzCi2f_ZTanWQg",
          "taskResourceUsage" : {
            "cpu_time_in_nanos" : 259000,
            "memory_in_bytes" : 3720
          }
        }
      ],
      "labels" : { },
      "source" : {
        "size" : 20,
        "query" : {
          "term" : {
            "user.id" : {
              "value" : "cyji",
              "boost" : 1.0
            }
          }
        }
      },
      "total_shards" : 1,
      "phase_latency_map" : {
        "expand" : 0,
        "query" : 7,
        "fetch" : 0
      },
      "indices" : [
        "my-index-0"
      ],
      "search_type" : "query_then_fetch",
      "node_id" : "GMGKkdcNTzCi2f_ZTanWQg",
      "query_hashcode" : "5b736559acb94cbe940c73e4fe19245",
      "measurements" : {
        "memory" : {
          "number" : 76528,
          "count" : 2,
          "aggregationType" : "AVERAGE"
        },
        "cpu" : {
          "number" : 4701000,
          "count" : 2,
          "aggregationType" : "AVERAGE"
        },
        "latency" : {
          "number" : 10,
          "count" : 2,
          "aggregationType" : "AVERAGE"
        }
      }
    }
  ]
}
  • disable grouping
{
  "persistent" : {
    "search.insights.top_queries.group_by" : "none"
  }
}
  • send the same search queries multiple times
  • check UI, queries are displayed
image

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

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.

Signed-off-by: Chenyang Ji <[email protected]>
@ansjcy
Copy link
Member Author

ansjcy commented Nov 7, 2024

@deshsidd deshsidd merged commit 9efdbaf into opensearch-project:main Nov 11, 2024
6 of 7 checks passed
deshsidd added a commit that referenced this pull request Nov 15, 2024
This reverts commit 9efdbaf.

Signed-off-by: Siddhant Deshmukh <[email protected]>
deshsidd added a commit that referenced this pull request Nov 15, 2024
This reverts commit 9efdbaf.

Signed-off-by: Siddhant Deshmukh <[email protected]>
deshsidd added a commit that referenced this pull request Jan 14, 2025
This reverts commit 9efdbaf.

Signed-off-by: Siddhant Deshmukh <[email protected]>
ansjcy pushed a commit that referenced this pull request Jan 16, 2025
* Revert "remove records with grouping (#26)"

This reverts commit 9efdbaf.

Signed-off-by: Siddhant Deshmukh <[email protected]>

* Query grouping dashboard changes and extensive tests

Signed-off-by: Siddhant Deshmukh <[email protected]>

* Fix tests and linting

Signed-off-by: Siddhant Deshmukh <[email protected]>

* Address review comments

Signed-off-by: Siddhant Deshmukh <[email protected]>

* Address review comments and update tests

Signed-off-by: Siddhant Deshmukh <[email protected]>

* Update cypress tests, hashcode to id, refactoring

Signed-off-by: Siddhant Deshmukh <[email protected]>

* Lint

Signed-off-by: Siddhant Deshmukh <[email protected]>

---------

Signed-off-by: Siddhant Deshmukh <[email protected]>
ansjcy pushed a commit to ansjcy/query-insights-dashboards that referenced this pull request Jan 16, 2025
…ect#33)

* Revert "remove records with grouping (opensearch-project#26)"

This reverts commit 9efdbaf.

Signed-off-by: Siddhant Deshmukh <[email protected]>

* Query grouping dashboard changes and extensive tests

Signed-off-by: Siddhant Deshmukh <[email protected]>

* Fix tests and linting

Signed-off-by: Siddhant Deshmukh <[email protected]>

* Address review comments

Signed-off-by: Siddhant Deshmukh <[email protected]>

* Address review comments and update tests

Signed-off-by: Siddhant Deshmukh <[email protected]>

* Update cypress tests, hashcode to id, refactoring

Signed-off-by: Siddhant Deshmukh <[email protected]>

* Lint

Signed-off-by: Siddhant Deshmukh <[email protected]>

---------

Signed-off-by: Siddhant Deshmukh <[email protected]>
deshsidd added a commit that referenced this pull request Jan 16, 2025
* Revert "remove records with grouping (#26)"

This reverts commit 9efdbaf.



* Query grouping dashboard changes and extensive tests



* Fix tests and linting



* Address review comments



* Address review comments and update tests



* Update cypress tests, hashcode to id, refactoring



* Lint



---------

Signed-off-by: Siddhant Deshmukh <[email protected]>
Co-authored-by: Siddhant Deshmukh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants