In Spring Data Elasticsearch - I noticed something that looks like a bug with the generated findAllByFoo
type methods.
These seem to be limited to the default size (of 10) - which goes against the semantics you would expect from a findAll
operation.
The main findAll()
operation does work correctly however and does return all documents.
So - is this a bug or is there something I'm missing? Cheers, Eugen.
It doesn't look like a bug.
According to elasticsearch's documentation (from/size) it looks like 10 is the default number of results that elasticsearch will return from a search query.
You can modify the page size with an appropriate Pageable parameter, e.g.:
Page<User> users = repository.findAll(new PageRequest(1, 20))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With