REST: Avoid Lucene crashes when searching for 0 documents

This commit is contained in:
François-Xavier Thomas
2017-05-17 00:26:48 +02:00
parent 87ed516049
commit b9be3fef1d
@@ -159,6 +159,8 @@ public class SearchService {
int count = criteria.getCount();
result.setOffset(offset);
if (count <= 0) return result;
IndexReader reader = null;
try {
reader = createIndexReader(indexType);