Closed tomqwpl closed 1 year ago
The Search method will return partial results if the size limit or time limit parameters are used and the limit is exceeded.
In the case of SearchWithPaging, the results are only appended if there is no error:
result, err := l.Search(searchRequest) if err != nil { return searchResult, err } searchResult.Entries = append(searchResult.Entries, result.Entries...)
If you therefore use SearchWithPaging with a limit of, say, 5, and there are more results, you're not going to get any results.
I think the appends need to happen regardless of the error (assuming searchResult is non-nil)
Hi @cpuschma, Can I take this issue? Will you be able to review PR if i send? Thanks
Sure, I would be very happy about a PR, @ksankeerth ^^
The Search method will return partial results if the size limit or time limit parameters are used and the limit is exceeded.
In the case of SearchWithPaging, the results are only appended if there is no error:
If you therefore use SearchWithPaging with a limit of, say, 5, and there are more results, you're not going to get any results.
I think the appends need to happen regardless of the error (assuming searchResult is non-nil)