Skip to content

Commit

Permalink
Fix search request missing a slash when no indices are given
Browse files Browse the repository at this point in the history
Signed-off-by: Jakob Hahn <[email protected]>
  • Loading branch information
Jakob3xD committed Feb 14, 2024
1 parent 413d258 commit e4ea7b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Deprecated
### Removed
### Fixed
- Fix search request missing a slash when no indices are given ([#470](https://github.com/opensearch-project/opensearch-go/pull/469))
### Security

## [3.0.0]
Expand Down Expand Up @@ -142,4 +143,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
[2.1.0]: https://github.com/opensearch-project/opensearch-go/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/opensearch-project/opensearch-go/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/opensearch-project/opensearch-go/compare/v1.1.0...v2.0.0
[1.0.0]: https://github.com/opensearch-project/opensearch-go/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/opensearch-project/opensearch-go/compare/v1.0.0...v1.1.0
2 changes: 1 addition & 1 deletion opensearchapi/api_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (r SearchReq) GetRequest() (*http.Request, error) {
if len(r.Indices) > 0 {
path = fmt.Sprintf("/%s/_search", strings.Join(r.Indices, ","))
} else {
path = "_search"
path = "/_search"
}

return opensearch.BuildRequest(
Expand Down

0 comments on commit e4ea7b4

Please sign in to comment.