Add query timeout in Elastic native query - springboot

How can I add query timeout in the below Native Seach Query?

final QueryBuilder contentTagQuery = QueryBuilders.boolQuery()
                .filter( QueryBuilders.termQuery("tenantId" , "en"));
NativeSearchQuery query = new NativeSearchQuery(contentTagQuery);
query.setMaxResults(1);

SearchHits<Content> searchHits =
         elasticsearchOperations.search(
                        query, Content.class,
                        IndexCoordinates.of("index"));

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.