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 <[email protected]>

* Modify change log

Signed-off-by: Gao Binlong <[email protected]>

* Modify change log

Signed-off-by: Gao Binlong <[email protected]>

* Add assertion

Signed-off-by: Gao Binlong <[email protected]>

---------

Signed-off-by: Gao Binlong <[email protected]>
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
…oject#10395)

* Add telemetry tracer/metric enable flag and integ test

Signed-off-by: Gagan Juneja <[email protected]>

* Add Changelog

Signed-off-by: Gagan Juneja <[email protected]>

* Fix compilation issue

Signed-off-by: Gagan Juneja <[email protected]>

* Empty-Commit

Signed-off-by: Gagan Juneja <[email protected]>

* Add component flag to traceable wrappers

Signed-off-by: Gagan Juneja <[email protected]>

* Address review comment

Signed-off-by: Gagan Juneja <[email protected]>

* Address review comment

Signed-off-by: Gagan Juneja <[email protected]>

* Address review comment

Signed-off-by: Gagan Juneja <[email protected]>

* Address review comment

Signed-off-by: Gagan Juneja <[email protected]>

* Address review comment

Signed-off-by: Gagan Juneja <[email protected]>

* Address review comment

Signed-off-by: Gagan Juneja <[email protected]>

---------

Signed-off-by: Gagan Juneja <[email protected]>
Signed-off-by: Gagan Juneja <[email protected]>
Co-authored-by: Gagan Juneja <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
…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 <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
…0557)

* Change filenames for IndexMetadata and Manifest

Signed-off-by: Dhwanil Patel <[email protected]>
…ect#10503)

* revive remote cluster state auto restore integ tests

Signed-off-by: bansvaru <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
* Upload global cluster state to remote store

Signed-off-by: Dhwanil Patel <[email protected]>
…s.testShardAlreadyReplicating (opensearch-project#10660)

* Remove Awaits fix.

Signed-off-by: Rishikesh1159 <[email protected]>

* apply spotlesscheck.

Signed-off-by: Rishikesh1159 <[email protected]>

* add test logging.

Signed-off-by: Rishikesh1159 <[email protected]>

---------

Signed-off-by: Rishikesh1159 <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
OnBehalfOf claims take second duration

Signed-off-by: Stephen Crawford <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
…ch-project#10535)

* Download funcationality of global metadata from remote store

Signed-off-by: Dhwanil Patel <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
… loss recovery (opensearch-project#10447)

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

Signed-off-by: bansvaru <[email protected]>
Signed-off-by: David Zane <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
@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)