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

[BUG] Index name is added two times to a query when using SearchRequest #576

Closed
helgeolav opened this issue Jul 1, 2024 · 1 comment
Closed
Labels
bug Something isn't working untriaged

Comments

@helgeolav
Copy link

What is the bug?

Using opensearch-go v2.3.0 I create a query like this:

`search := opensearchapi.SearchRequest{

 Body: content,

 Index: []string{"my-indices-*"},

}


searchResponse, err := search.Do(context.Background(), client)

`

When I debug the code, I see that in opensearchtransport.setReqURL(...) the indices are added again to the request URL, so that the request URL will become like: http://myserver:9200/my-indices-*/my-indices-*/_search

How can one reproduce the bug?

A search request like the one above should give the same result.

What is the expected behavior?

The request URL should be: http://myserver:9200/my-indices-*/_search

What is your host/environment?

Windows 10 22H2
Golang 1.22.4

Do you have any screenshots?

Not at this point.

Do you have any additional context?

No.

@helgeolav helgeolav added bug Something isn't working untriaged labels Jul 1, 2024
@helgeolav
Copy link
Author

I looked at the client initialization, and see that they added the index search as part of the addresses, so this is clearly a fault on my side. Closing the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

1 participant