Skip to content

Conversation

@ForeverSRC
Copy link
Contributor

Description

The change is to add the phase_took feature in Search API start from OpenSearch 2.12

Example

GET /my-index-000001/_search?phase_took
{
  "took" : 105,
  "phase_took" : {
    "dfs_pre_query" : 0,
    "query" : 69,
    "fetch" : 22,
    "dfs_query" : 0,
    "expand" : 4,
    "can_match" : 0
  },
  "timed_out" : false,
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
    "value" : 0,
    "relation" : "eq"
  },
  "max_score" : null,
  "hits" : [ ]
}

Reference:

Issues Resolved

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.

@codecov
Copy link

codecov bot commented Aug 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.33%. Comparing base (06a6dc8) to head (385a706).
⚠️ Report is 115 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #722      +/-   ##
==========================================
+ Coverage   57.29%   60.33%   +3.04%     
==========================================
  Files         315      377      +62     
  Lines        9823    11698    +1875     
==========================================
+ Hits         5628     7058    +1430     
- Misses       2902     3205     +303     
- Partials     1293     1435     +142     
Flag Coverage Δ
integration 52.85% <100.00%> (+2.01%) ⬆️
unit 14.92% <100.00%> (+2.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
opensearchapi/api_search-params.go 90.56% <100.00%> (+83.23%) ⬆️
opensearchapi/api_search.go 100.00% <ø> (ø)

... and 109 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ForeverSRC ForeverSRC force-pushed the feature/support_phase_took branch 2 times, most recently from 52848f3 to 2ca3339 Compare August 24, 2025 04:53
Copy link
Collaborator

@Jakob3xD Jakob3xD left a comment

Choose a reason for hiding this comment

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

It seems, this options was added in 2.12.x. Please add the SkipIfBelowVersion function of our internal test package to skip the test if the version does not support it.
Thank you.

@ForeverSRC ForeverSRC force-pushed the feature/support_phase_took branch from 2ca3339 to e247ebf Compare October 7, 2025 06:07
@ForeverSRC ForeverSRC force-pushed the feature/support_phase_took branch from e247ebf to 08440a9 Compare October 7, 2025 06:15
Signed-off-by: ForeverSRC <[email protected]>
@ForeverSRC ForeverSRC requested a review from Jakob3xD October 7, 2025 06:38
@ForeverSRC
Copy link
Contributor Author

It seems, this options was added in 2.12.x. Please add the SkipIfBelowVersion function of our internal test package to skip the test if the version does not support it. Thank you.

@Jakob3xD Thank you. I have added the SkipIfBelowVersion`.
However, it seems that some integration tests can be failed randomly, I'm not sure how to rerun them. Could you please give me some advice?

@Jakob3xD Jakob3xD merged commit 313814a into opensearch-project:main Oct 7, 2025
105 of 106 checks passed
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