Add additional null check
This commit is contained in:
parent
53e298f66a
commit
e8d71a8f66
|
@ -119,7 +119,7 @@ public class DmpRepository extends ElasticRepository<Dmp, DmpCriteria> {
|
|||
|
||||
}
|
||||
searchSourceBuilder.query(boolQuery).from(criteria.getOffset()).fetchSource("id", null);
|
||||
if (criteria.getSize() > 0) {
|
||||
if (criteria.getSize() != null && criteria.getSize() > 0) {
|
||||
searchSourceBuilder.size(criteria.getSize());
|
||||
}
|
||||
sortBuilders.forEach(searchSourceBuilder::sort);
|
||||
|
|
Loading…
Reference in New Issue