Package org.opensearch.data.client.orhlc
Class ResponseConverter
java.lang.Object
org.opensearch.data.client.orhlc.ResponseConverter
Factory class to convert OpenSearch responses to different type of data classes.
- Since:
- 0.1
-
Method Summary
Modifier and TypeMethodDescriptionaliasDatas(Map<String, Set<org.opensearch.cluster.metadata.AliasMetadata>> aliasesMetadatas) static org.springframework.data.elasticsearch.core.query.ByQueryResponse.FailurebyQueryResponseFailureOf(org.opensearch.action.bulk.BulkItemResponse.Failure failure) Create a newByQueryResponse.FailurefromBulkItemResponse.Failurestatic org.springframework.data.elasticsearch.core.query.ByQueryResponsebyQueryResponseOf(org.opensearch.index.reindex.BulkByScrollResponse bulkByScrollResponse) static org.springframework.data.elasticsearch.core.query.ByQueryResponse.SearchFailurebyQueryResponseSearchFailureOf(org.opensearch.index.reindex.ScrollableHitSource.SearchFailure searchFailure) Create a newByQueryResponse.SearchFailurefromScrollableHitSource.SearchFailurestatic org.springframework.data.elasticsearch.core.cluster.ClusterHealthclusterHealth(org.opensearch.action.admin.cluster.health.ClusterHealthResponse clusterHealthResponse) static org.springframework.data.elasticsearch.core.index.SettingsfromSettingsResponse(org.opensearch.action.admin.indices.settings.get.GetSettingsResponse response, String indexName) extract the index settings information for a given indexstatic org.springframework.data.elasticsearch.core.MultiGetItem.FailuregetFailure(org.opensearch.action.get.MultiGetItemResponse itemResponse) static List<org.springframework.data.elasticsearch.core.IndexInformation>getIndexInformations(org.opensearch.action.admin.indices.get.GetIndexResponse getIndexResponse) get the index informations from aGetIndexResponse(transport client)static List<org.springframework.data.elasticsearch.core.IndexInformation>getIndexInformations(org.opensearch.client.indices.GetIndexResponse getIndexResponse) get the index informations from aGetIndexResponsestatic org.springframework.data.elasticsearch.core.index.TemplateDatagetTemplateData(org.opensearch.client.indices.GetIndexTemplatesResponse getIndexTemplatesResponse, String templateName) static org.springframework.data.elasticsearch.core.reindex.ReindexResponse.FailurereindexResponseFailureOf(org.opensearch.action.bulk.BulkItemResponse.Failure failure) static org.springframework.data.elasticsearch.core.reindex.ReindexResponsereindexResponseOf(org.opensearch.index.reindex.BulkByScrollResponse bulkByScrollResponse) static org.springframework.data.elasticsearch.core.index.AliasDatatoAliasData(org.opensearch.cluster.metadata.AliasMetadata aliasMetaData)
-
Method Details
-
aliasDatas
-
toAliasData
public static org.springframework.data.elasticsearch.core.index.AliasData toAliasData(org.opensearch.cluster.metadata.AliasMetadata aliasMetaData) -
getIndexInformations
public static List<org.springframework.data.elasticsearch.core.IndexInformation> getIndexInformations(org.opensearch.client.indices.GetIndexResponse getIndexResponse) get the index informations from aGetIndexResponse- Parameters:
getIndexResponse- the index response, must not be null- Returns:
- list of
IndexInformations for the different indices
-
getIndexInformations
public static List<org.springframework.data.elasticsearch.core.IndexInformation> getIndexInformations(org.opensearch.action.admin.indices.get.GetIndexResponse getIndexResponse) get the index informations from aGetIndexResponse(transport client)- Parameters:
getIndexResponse- the index response, must not be null- Returns:
- list of
IndexInformations for the different indices
-
getTemplateData
@Nullable public static org.springframework.data.elasticsearch.core.index.TemplateData getTemplateData(org.opensearch.client.indices.GetIndexTemplatesResponse getIndexTemplatesResponse, String templateName) -
fromSettingsResponse
public static org.springframework.data.elasticsearch.core.index.Settings fromSettingsResponse(org.opensearch.action.admin.indices.settings.get.GetSettingsResponse response, String indexName) extract the index settings information for a given index- Parameters:
response- the OpenSearch responseindexName- the index name- Returns:
- settings
-
getFailure
@Nullable public static org.springframework.data.elasticsearch.core.MultiGetItem.Failure getFailure(org.opensearch.action.get.MultiGetItemResponse itemResponse) -
clusterHealth
public static org.springframework.data.elasticsearch.core.cluster.ClusterHealth clusterHealth(org.opensearch.action.admin.cluster.health.ClusterHealthResponse clusterHealthResponse) -
byQueryResponseOf
public static org.springframework.data.elasticsearch.core.query.ByQueryResponse byQueryResponseOf(org.opensearch.index.reindex.BulkByScrollResponse bulkByScrollResponse) -
byQueryResponseFailureOf
public static org.springframework.data.elasticsearch.core.query.ByQueryResponse.Failure byQueryResponseFailureOf(org.opensearch.action.bulk.BulkItemResponse.Failure failure) Create a newByQueryResponse.FailurefromBulkItemResponse.Failure- Parameters:
failure-BulkItemResponse.Failureto translate- Returns:
- a new
ByQueryResponse.Failure
-
byQueryResponseSearchFailureOf
public static org.springframework.data.elasticsearch.core.query.ByQueryResponse.SearchFailure byQueryResponseSearchFailureOf(org.opensearch.index.reindex.ScrollableHitSource.SearchFailure searchFailure) Create a newByQueryResponse.SearchFailurefromScrollableHitSource.SearchFailure- Parameters:
searchFailure-ScrollableHitSource.SearchFailureto translate- Returns:
- a new
ByQueryResponse.SearchFailure
-
reindexResponseOf
public static org.springframework.data.elasticsearch.core.reindex.ReindexResponse reindexResponseOf(org.opensearch.index.reindex.BulkByScrollResponse bulkByScrollResponse) -
reindexResponseFailureOf
public static org.springframework.data.elasticsearch.core.reindex.ReindexResponse.Failure reindexResponseFailureOf(org.opensearch.action.bulk.BulkItemResponse.Failure failure) - Since:
- 4.4
-