Not all results being returned as expected when using Repository
Opened this issue · 1 comments
If creating several documents and searching with a parameter, the results are limited to 10 objects in some cases which I believe is inheriting from ES's default size
setting.
For example, if I create 20 documents with "parent": "ParentName"
and try to search via parent=ParentName
, only 10 results may be returned.
Creating a Repository with either List<Object> findByParent(String parent);
or Iterable<Object> findByParent(String parent);
is limited to 10 records, whereas a Repository with Stream<Object> findByParent(String parent);
returns the full set as expected.
Is this expected behavior?
Hi @40b0a3cd , Indeed it's the expected behavior ( and the behavior of SpringDataElasticsearch ).
If you want more than 10 results you must add second argument of type Page. It's automatically taken into account.
Thanks for your feedback.
Julien.