Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Nov 4, 2025

This is an automatic copy of pull request #13885 done by Mergify.


Issue

https://gravitee.atlassian.net/browse/APIM-10781

Description

This PR fixes a bug where using the payload/body filter in v2 API logs returned an incorrect total when matching log entries spanned multiple pages.

Root cause
The repository previously only gathered the set of log _ids from a single page of LOG results (aligned to the user page), then applied that subset to filter REQUEST documents. When matching logs were spread across multiple pages, many matching request IDs were omitted and the total returned was incorrect.

Screen.Recording.2025-10-31.at.11.46.36.PM.mov

Fix

  • Enumerate matching LOG hits using search_after (iterative paging) and collect _ids up to a configurable cap (max_result_window) rather than relying on a single page.
  • Use the collected _id set to filter the REQUEST index, and then apply the original pagination (page, size) to the REQUEST query.
Screen.Recording.2025-10-31.at.11.49.09.PM.mov

Additional context


@mergify mergify bot requested a review from a team as a code owner November 4, 2025 08:31
@vikrantgravitee vikrantgravitee merged commit 2cd0e87 into 4.6.x Nov 4, 2025
25 checks passed
@vikrantgravitee vikrantgravitee deleted the mergify/bp/4.6.x/pr-13885 branch November 4, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants