Fix bugs in the Lucene backend when maxResults is set to 0

Description

Can't really explain why it was so wrong... but let's fix it.

Environment

None

Status

Assignee

Guillaume Smet

Reporter

Guillaume Smet

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major
Configure