Offset is not advanced in AI Search backend in some scenarios causing max retries to be hit
# Summary
Fix offset handling in doSearchWithIteration() so retries make progress, and let callers disable retries via search_api_ai_max_pager_iterations.
# Problem
When search_api_bypass_access is true, `$params['offset']` is only advanced in the `!$bypass_access` route, so every retry re-fetches the identical window. If the first batch doesn't yield enough distinct entities (e.g. a chunked index), the loop can never make progress and always burns all `maxAccessRetries` round trips. Separately, `search_api_ai_max_pager_iterations` is read with a truthy check, so passing 0 (disable retries) is silently ignored. Together these caused a single `BoostByAiSearchBase`-driven search to take many times longer than it should.
# Proposed solution
- Advance `$params['offset']` every iteration, regardless of $bypass_access.
- Replace the truthy check on `search_api_ai_max_pager_iterations` with an explicit `!== NULL` check.
- In `BoostByAiSearchBase::getAiSearchResults()` let the search decide whether it is happy with a variable number of results (e.g. no iterations) or still able to iterate
# Workaround
None currently — the retry behavior is internal and not caller-controllable.
issue