Add argument checks for offset and pagesize in xapr_search