Skip to content

Hotfix: fix search aggregator error with limit 0#7972

Merged
timvisee merged 2 commits intodevfrom
fix-search-agg-limit-zero
Jan 23, 2026
Merged

Hotfix: fix search aggregator error with limit 0#7972
timvisee merged 2 commits intodevfrom
fix-search-agg-limit-zero

Conversation

@timvisee
Copy link
Member

Hotfix for #7967

It hits the unwrap here:

let length = NonZeroUsize::new(length).expect("length must be greater than zero");

I wasn't able to reproduce the exact issue reported by the user, but we clearly see a limit of 0 reached the search aggregator. There seem to be multiple ways to make this happen.

This applies a hotfix to accept a limit of 0, which will just collect no results.

In my opinion a better fix would be to propagate NonZeroUsize to more places, and to not process any queries with a limit of 0 at all. But it didn't seem very trivial to implement that so I'd like to give that a shot in a separate PR.

We hit a similar issue before here: #7632

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

coderabbitai[bot]

This comment was marked as resolved.

@qdrant qdrant deleted a comment from coderabbitai bot Jan 22, 2026
@qdrant qdrant deleted a comment from coderabbitai bot Jan 22, 2026
@timvisee timvisee merged commit 168f2fc into dev Jan 23, 2026
20 of 21 checks passed
@timvisee timvisee deleted the fix-search-agg-limit-zero branch January 23, 2026 09:15
generall pushed a commit that referenced this pull request Feb 9, 2026
* Hotfix: fix search aggregator error with limit 0

* Don't handle points if limit is zero
@timvisee timvisee mentioned this pull request Feb 17, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants