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 in for loop for meilisearch List Function #152

Closed
Honigeintopf opened this issue Sep 4, 2024 · 1 comment · Fixed by #153
Closed

Bug in for loop for meilisearch List Function #152

Honigeintopf opened this issue Sep 4, 2024 · 1 comment · Fixed by #153

Comments

@Honigeintopf
Copy link
Collaborator

I've noticed that in the Search method, the search queries are overwriting the indexuid.
This happens because the same SearchRequest instance reqProto is reused for each index, causing all queries to end up with the IndexUID of the last index, which eventually leads to metalctl audit ls to never list anything than the last index.

for _, index := range indexes.Results {
if !isIndexRelevantForSearchRange(index.UID, filter.From, filter.To) {
continue
}
indexQuery := reqProto
indexQuery.IndexUID = index.UID
req.Queries = append(req.Queries, indexQuery)

@Honigeintopf
Copy link
Collaborator Author

Fixed it already, but can't push in this repo yet.

@Honigeintopf Honigeintopf linked a pull request Sep 4, 2024 that will close this issue
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 a pull request may close this issue.

1 participant