Skip to content

SearchWithPaging doesn't return all results if size limit or time limit exeeded #411

@tomqwpl

Description

@tomqwpl

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions