Description
When using the fetch_size API (default fetch_size = 500), the result status bar does not correctly display the total document count in certain head command scenarios. Both cases below are bugs — the status should always reflect the total number of hits, not just the number of documents retrieved by the query.
Related PR: #5109
Bug 1: head N where N < fetch_size
Example: head 200 with default fetch_size = 500
- Current behavior: Shows
200 of 200 results
- Expected behavior: Should show
200 results
The status should reflect how many total documents match the query, not just how many were returned.
Bug 2: head N where N > fetch_size
Example: head 600 with default fetch_size = 500
- Current behavior: Shows
500 of 600 results
- Expected behavior: Should show
600 of {total_hits} results
When the user-specified head value exceeds the default fetch_size, the head value should override fetch_size so that all requested rows are returned.
Summary of Expected Behavior
- The result status should always show the total document count (total hits), not just the number of documents retrieved from the query.
- If
head value > fetch_size, the head value should override fetch_size.
- If
head value < fetch_size, the status should show head_value of total_hits.
Description
When using the
fetch_sizeAPI (defaultfetch_size = 500), the result status bar does not correctly display the total document count in certainheadcommand scenarios. Both cases below are bugs — the status should always reflect the total number of hits, not just the number of documents retrieved by the query.Related PR: #5109
Bug 1:
head Nwhere N < fetch_sizeExample:
head 200with defaultfetch_size = 500200 of 200 results200 resultsThe status should reflect how many total documents match the query, not just how many were returned.
Bug 2:
head Nwhere N > fetch_sizeExample:
head 600with defaultfetch_size = 500500 of 600 results600 of {total_hits} resultsWhen the user-specified
headvalue exceeds the defaultfetch_size, theheadvalue should overridefetch_sizeso that all requested rows are returned.Summary of Expected Behavior
headvalue >fetch_size, theheadvalue should overridefetch_size.headvalue <fetch_size, the status should showhead_value of total_hits.