CCET-768: add track total hits to os-query lib#15
Merged
mikesmitharoo merged 1 commit intomainfrom Jul 3, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for the track_total_hits option on search requests, exposing it through the client API and updating tests.
- Introduces a new
TrackTotalHitsmethod and request field - Modifies request serialization to include
"track_total_hits" - Updates existing tests to verify the new field
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| search.go | Added trackTotalHits field, method, and mapping |
| search_test.go | Extended tests to cover TrackTotalHits(true) usage |
Comments suppressed due to low confidence (1)
search.go:88
- Fix grammatical number agreement: change "Supported values is" to "Supported values are".
// TrackTotalHits sets whether the search should count the total number of hits past the limit. Supported values is a number [range] or a bool
d408b25 to
db159de
Compare
db159de to
8386883
Compare
ducka
approved these changes
Jul 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.