Why do I have keywords that generate a search page with results when they don't?
It is necessary to specify the value 0 in the variable "resultPageNumber" when a page without result is displayed for it to be correctly counted.
In short:
No result, set "resultPageNumber" to 0
If results to display, set "resultPageNumber" to 1