You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agree documentation part of spring data elasticsearch is wrong for your test case. I will change that for sure.
It will return a single Object as internally it will call queryForObject of ElasticsearchTemplate class.
If you want multiple records please call for Page request.
Initially we implemented support for List but it is not feasible as you could have 1000s of record and you don’t want to load all of them in a list at a time.
Hence List is replaced by Page request. And you can easily get List by using getContent() method of Page.
I have added two test cases for detail information , you can always fork sample application project and add more test cases and play around !
I will talk to my team about repository methods that return List with Pageable request. If it will be feasible then it will be available soon
also you are using Client in your test case to delete data from index, which is not required as repository has deleteAll() default method to do that(see test case for more detail)
Hope that helps
Let me know if you still have doubt
An mvn clean package on this repository includes an example that fails. it is infact amongst the first examples I tried and might be a user error.
The exception occurs in spring-data-elasticsearch, the results from ES itself are what I would expect.
https://github.com/maddalab/sample-es-application
The text was updated successfully, but these errors were encountered: