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
When using SearchOperations#searchForStream(Query, Class<T>) - and this is used when a repository method is defined to return a Stream<T> - currently it is necessary to call the close() method of the iterator/stream to delete the associated scroll context from Elasticsearch. If this is not done, the scroll context will automatically timeout after 60 seconds, but if many stream are created, then the limit of 500 scroll contexts in Elasticsearch may be reached.
As the implementation knows when all documents are processed, we should call close() automatically when the iterator has no more records so that an explicit closing is not necessary.
The text was updated successfully, but these errors were encountered:
When using
SearchOperations#searchForStream(Query, Class<T>)
- and this is used when a repository method is defined to return aStream<T>
- currently it is necessary to call theclose()
method of the iterator/stream to delete the associated scroll context from Elasticsearch. If this is not done, the scroll context will automatically timeout after 60 seconds, but if many stream are created, then the limit of 500 scroll contexts in Elasticsearch may be reached.As the implementation knows when all documents are processed, we should call
close()
automatically when the iterator has no more records so that an explicit closing is not necessary.The text was updated successfully, but these errors were encountered: