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

Adding stat for query with filter #587

Conversation

martin-gaievski
Copy link
Member

Signed-off-by: Martin Gaievski [email protected]

Description

Adding counter stat "knn_query_with_filter_requests" for queries with filter field. Example of response with new stat

    "nodes": {
        "gIsW_7cBQwqSeZ2sr5knEw": {
            "graph_memory_usage_percentage": 0.0,
            "graph_query_requests": 0,
            "graph_memory_usage": 0,
            "cache_capacity_reached": false,
            "load_success_count": 0,
            "training_memory_usage": 0,
            "indices_in_cache": {},
            "script_query_errors": 0,
            "hit_count": 0,
            "knn_query_requests": 2,
            "total_load_time": 0,
            "miss_count": 0,
            "knn_query_with_filter_requests": 1,
            "training_memory_usage_percentage": 0.0,
            "lucene_initialized": true,
            "graph_index_requests": 0,
            "faiss_initialized": false,
            "load_exception_count": 0,
            "training_errors": 0,
            "eviction_count": 0,
            "nmslib_initialized": false,
            "script_compilations": 0,
            "script_query_requests": 0,
            "graph_query_errors": 0,
            "indexing_from_model_degraded": false,
            "graph_index_errors": 0,
            "training_requests": 0,
            "script_compilation_errors": 0
        }
    }

Issues Resolved

#376

Check List

  • New functionality includes testing.
    • All tests pass
  • Commits are signed as per the DCO using --signoff

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.

@martin-gaievski martin-gaievski added Enhancements Increases software capabilities beyond original client specifications v2.4.0 'Issues and PRs related to version v2.4.0' feature branch labels Oct 20, 2022
@martin-gaievski martin-gaievski requested a review from a team October 20, 2022 00:19
Signed-off-by: Martin Gaievski <[email protected]>
@martin-gaievski martin-gaievski force-pushed the add-query-filtering-stats branch from 031311c to 6f7821f Compare October 20, 2022 00:36
@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2022

Codecov Report

Merging #587 (6f7821f) into feature/efficient-filtering (44f10de) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@                        Coverage Diff                        @@
##             feature/efficient-filtering     #587      +/-   ##
=================================================================
+ Coverage                          84.49%   84.51%   +0.02%     
  Complexity                          1054     1054              
=================================================================
  Files                                149      149              
  Lines                               4295     4301       +6     
  Branches                             382      382              
=================================================================
+ Hits                                3629     3635       +6     
  Misses                               489      489              
  Partials                             177      177              
Impacted Files Coverage Δ
...rg/opensearch/knn/index/query/KNNQueryBuilder.java 84.21% <100.00%> (+0.10%) ⬆️
...va/org/opensearch/knn/plugin/stats/KNNCounter.java 100.00% <100.00%> (ø)
...rg/opensearch/knn/plugin/stats/KNNStatsConfig.java 98.07% <100.00%> (+0.11%) ⬆️
...ava/org/opensearch/knn/plugin/stats/StatNames.java 89.74% <100.00%> (+0.26%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@jmazanec15 jmazanec15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please make sure docs get updated as well.

@martin-gaievski martin-gaievski merged commit 52e2b6b into opensearch-project:feature/efficient-filtering Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancements Increases software capabilities beyond original client specifications feature branch v2.4.0 'Issues and PRs related to version v2.4.0'
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants