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

Categorize search queries by type and log query shape #10502

Closed

Conversation

deshsidd
Copy link
Contributor

@deshsidd deshsidd commented Oct 9, 2023

Description

Changes to categorize search queries based on the type of the query (eg: bool, match, multi-match, etc).
Changes also log the query shape of a query (queries can have a nested structure with a hierarchy of subqueries).

  • Use QueryShapeVisitor to debug log the shape of the queries. Example
  • Use QueryBuilderVisitor to visit all the nodes of the querybuilder tree for incoming search queries and increment counters to capture query type information
  • Integrate with Metric Framework for the counters

Related Issues

Resolves #10250

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

Compatibility status:

Checks if related components are compatible with change b2d7e67

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git]

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

Gradle Check (Jenkins) Run Completed with:

gaobinlong and others added 23 commits October 18, 2023 16:57
…h-project#9255)

* Fix dissect ingest processor parsing empty brackets failed

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Modify change log

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Modify change log

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

* Add assertion

Signed-off-by: Gao Binlong <gbinlong@amazon.com>

---------

Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
Co-authored-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
…oject#10395)

* Add telemetry tracer/metric enable flag and integ test

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Add Changelog

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Fix compilation issue

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Empty-Commit

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Add component flag to traceable wrappers

Signed-off-by: Gagan Juneja <gagandeepjuneja@gmail.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

* Address review comment

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>

---------

Signed-off-by: Gagan Juneja <gjjuneja@amazon.com>
Signed-off-by: Gagan Juneja <gagandeepjuneja@gmail.com>
Co-authored-by: Gagan Juneja <gjjuneja@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
…search-project#10671)

This test is flaky in two ways, one it may hit a case where a merge occurs and the hardcoded segment does not exist to delete.
Two with certain mock filesystems a corruption exception won't be thrown here, only a NoSuchFile - This doesn't change our
handling in the engine, but the test should conditionally handle if the store is marked corrupted on close.

Signed-off-by: Marc Handalian <handalm@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
…0557)

* Change filenames for IndexMetadata and Manifest

Signed-off-by: Dhwanil Patel <dhwanip@amazon.com>
…ect#10503)

* revive remote cluster state auto restore integ tests

Signed-off-by: bansvaru <bansvaru@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
* Upload global cluster state to remote store

Signed-off-by: Dhwanil Patel <dhwanip@amazon.com>
…s.testShardAlreadyReplicating (opensearch-project#10660)

* Remove Awaits fix.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* apply spotlesscheck.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

* add test logging.

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>

---------

Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
opensearch-project#10690)

Signed-off-by: vikasvb90 <vikasvb@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
OnBehalfOf claims take second duration

Signed-off-by: Stephen Crawford <steecraw@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
)

Signed-off-by: Kunal Kotwani <kkotwani@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
…ch-project#10535)

* Download funcationality of global metadata from remote store

Signed-off-by: Dhwanil Patel <dhwanip@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
… loss recovery (opensearch-project#10447)

* Remote Restore Cluster Metadata if local disk state lost after quorum loss

Signed-off-by: bansvaru <bansvaru@amazon.com>
…ct#10712)

Signed-off-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Signed-off-by: Kunal Kotwani <kkotwani@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Signed-off-by: David Zane <davizane@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
Signed-off-by: Siddhant Deshmukh <deshsid@amazon.com>
@deshsidd deshsidd force-pushed the sid/search-query-category branch from b2d7e67 to 8cfe2bf Compare October 19, 2023 00:01
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@deshsidd deshsidd closed this Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search Query Categorization (Phase 1)