mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-08 05:02:11 +00:00
DATAES-124 - ElasticSearchTemplate should expose client
This commit is contained in:
parent
8bb4ac3653
commit
374acbdd63
@ -16,6 +16,7 @@
|
||||
package org.springframework.data.elasticsearch.core;
|
||||
|
||||
import org.elasticsearch.action.update.UpdateResponse;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.metadata.AliasMetaData;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
|
||||
@ -41,6 +42,11 @@ public interface ElasticsearchOperations {
|
||||
*/
|
||||
ElasticsearchConverter getElasticsearchConverter();
|
||||
|
||||
/**
|
||||
* @return elasticsearch client
|
||||
*/
|
||||
Client getClient();
|
||||
|
||||
/**
|
||||
* Create an index for a class
|
||||
*
|
||||
|
@ -139,6 +139,11 @@ public class ElasticsearchTemplate implements ElasticsearchOperations, Applicati
|
||||
this.resultsMapper = resultsMapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Client getClient() {
|
||||
return client;
|
||||
}
|
||||
|
||||
public void setSearchTimeout(String searchTimeout) {
|
||||
this.searchTimeout = searchTimeout;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user