handle paging case
@@ -165,7 +165,8 @@ public class PersistedJpaBundleProvider implements IBundleProvider {
}
protected List<IBaseResource> doSearchOrEverything(final int theFromIndex, final int theToIndex) {
- if (mySearchEntity.getNumFound() <= 0) {
+ if (mySearchEntity.getTotalCount() != null && mySearchEntity.getNumFound() <= 0) {
+ // This is a _summary=count search
return Collections.emptyList();
}
final ISearchBuilder sb = myDao.newSearchBuilder();
