Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</scm>

<properties>
<es.version>7.0.1</es.version>
<es.version>7.9.3</es.version>
<hamcrest.version>1.3</hamcrest.version>
<mockito.version>2.28.2</mockito.version>
<gson.version>2.8.6</gson.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
import org.elasticsearch.client.indices.GetMappingsRequest;
import org.elasticsearch.client.indices.GetMappingsResponse;
import org.elasticsearch.client.indices.PutMappingRequest;
import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.cluster.metadata.MappingMetadata;
import org.elasticsearch.common.unit.TimeValue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -229,7 +229,7 @@ public void flush() {
* @return true if a mapping exists, false if it does not
*/
public boolean hasMapping(String index) {
MappingMetaData mapping = mapping(index);
MappingMetadata mapping = mapping(index);
return mapping != null && mapping.sourceAsMap() != null && !mapping.sourceAsMap().isEmpty();
}

Expand Down Expand Up @@ -470,9 +470,9 @@ private boolean isFailed() {
* Gets the mapping for an index.
*
* @param index the index to fetch the mapping for
* @return the MappingMetaData for the index
* @return the MappingMetadata for the index
*/
private MappingMetaData mapping(String index) {
private MappingMetadata mapping(String index) {
GetMappingsRequest request = new GetMappingsRequest().indices(index);
GetMappingsResponse response = callWithRetries(
"get mapping for index " + index,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.elasticsearch.client.security.RefreshPolicy;
import org.elasticsearch.client.security.user.User;
import org.elasticsearch.client.security.user.privileges.Role;
import org.elasticsearch.cluster.metadata.MappingMetaData;
import org.elasticsearch.cluster.metadata.MappingMetadata;
import org.elasticsearch.search.SearchHits;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -68,7 +68,7 @@ public long getDocCount(String index) throws IOException {
return client.count(request, RequestOptions.DEFAULT).getCount();
}

public MappingMetaData getMapping(String index) throws IOException {
public MappingMetadata getMapping(String index) throws IOException {
GetMappingsRequest request = new GetMappingsRequest().indices(index);
GetMappingsResponse response = client.indices().getMapping(request, RequestOptions.DEFAULT);
return response.mappings().get(index);
Expand Down