apache / apache/ponymail

Bug: stats.lua ignores maxresults if it is > 10000

Open
#334 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
80
Forks
32
PR merge metrics
No merged PRs in 30d

Description

If maxresults is < 10000, then at most maxresults will be returned, because the query uses the size=maxresults parameter.

If maxresults is > 10000 then stats.lua has to use scan/scroll to fetch the results.

Now when using scrolling, the size parameter is the max number of results per batch and if using scan/scroll it is the maximum results per shard per batch. It does not control the total responses; the scrolling only stops when no more results are available.

So when using scrolling the maxresults limit is ignored.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with stats.lua and trace the code path used when maxresults exceeds 10000, focusing on how scan/scroll batches are fetched and terminated. Done means scrolling stops after maxresults total responses rather than exhausting all available results.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, lua
Domain
backend, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.