-
Notifications
You must be signed in to change notification settings - Fork 58
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
added highlight to search endpoint whitelist #171
Conversation
Signed-off-by: Chris Pratt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a test and CHANGELOG, please, however trivial the implementation.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #171 +/- ##
============================================
- Coverage 24.19% 24.19% -0.01%
Complexity 1938 1938
============================================
Files 246 246
Lines 6865 6866 +1
============================================
Hits 1661 1661
- Misses 5204 5205 +1 ☔ View full report in Codecov by Sentry. |
@prattcmp Want to finish this? |
@@ -78,7 +78,8 @@ public function getParamWhitelist(): array | |||
'batched_reduce_size', | |||
'max_concurrent_shard_requests', | |||
'pre_filter_shard_size', | |||
'rest_total_hits_as_int' | |||
'rest_total_hits_as_int', | |||
'highlight' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @prattcmp, it looks like highlight isn't a valid parameter for the Search API. I tested it. Search doesn't include the highlight parameter here.
If you think there's something missing, feel free to contribute! You can also consider contributing to the opensearch API specification here and adding any missing parameters. Thanks!
Description
It fixes the whitelist for the search endpoint by adding "highlight". Maintainers should highly consider removing whitelist or making it optional.
Issues Resolved
List any issues this PR will resolve, e.g. Closes [...].
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.