Add limiting number of returned documents (does not work right now)

Signed-off-by: Ian Macalinao <me@ian.pw>