Fixes pagesize param was retrieved instead of pageSize

Also, forces casting `offset` and `pageSize` parameters to integers.

This fixes a problem preventing results (`hits`) to be sent in the search response object.