mirror of
				https://github.com/spring-projects/spring-data-elasticsearch.git
				synced 2025-10-31 06:38:44 +00:00 
			
		
		
		
	AbstractElasticsearchTemplate.searchForStream use Query scrolltime.
Original Pull Request #1951 Closes #1950
This commit is contained in:
		
							parent
							
								
									175e7b51ae
								
							
						
					
					
						commit
						464fc31d87
					
				| @ -69,6 +69,7 @@ import org.springframework.util.Assert; | |||||||
|  * @author Peter-Josef Meisch |  * @author Peter-Josef Meisch | ||||||
|  * @author Roman Puchkovskiy |  * @author Roman Puchkovskiy | ||||||
|  * @author Subhobrata Dey |  * @author Subhobrata Dey | ||||||
|  |  * @author Steven Pearce | ||||||
|  */ |  */ | ||||||
| public abstract class AbstractElasticsearchTemplate implements ElasticsearchOperations, ApplicationContextAware { | public abstract class AbstractElasticsearchTemplate implements ElasticsearchOperations, ApplicationContextAware { | ||||||
| 
 | 
 | ||||||
| @ -370,7 +371,8 @@ public abstract class AbstractElasticsearchTemplate implements ElasticsearchOper | |||||||
| 	@Override | 	@Override | ||||||
| 	public <T> SearchHitsIterator<T> searchForStream(Query query, Class<T> clazz, IndexCoordinates index) { | 	public <T> SearchHitsIterator<T> searchForStream(Query query, Class<T> clazz, IndexCoordinates index) { | ||||||
| 
 | 
 | ||||||
| 		long scrollTimeInMillis = Duration.ofMinutes(1).toMillis(); | 		Duration scrollTime = query.getScrollTime() != null ? query.getScrollTime() : Duration.ofMinutes(1); | ||||||
|  | 		long scrollTimeInMillis = scrollTime.toMillis(); | ||||||
| 		// noinspection ConstantConditions | 		// noinspection ConstantConditions | ||||||
| 		int maxCount = query.isLimiting() ? query.getMaxResults() : 0; | 		int maxCount = query.isLimiting() ? query.getMaxResults() : 0; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user