2014-10-10 5 views
1

jest를 사용하여 ES의 색인에 대한 별칭 매핑을 제거하려고합니다. 여기JEST를 사용하여 ElasticSearch에서 RemoveAliasMapping을 실행하는 방법

내가 시도 것입니다 :

// create Jest Client. 

JestClient client = factory.getObject(); 

// create RemoveAliasMapping Object. 

RemoveAliasMapping removeAliasMapping = new RemoveAliasMapping.Builder("oldIndex", "alias").build(); 

removeAliasMapping 객체를 생성 한 후, 나는 그것을 실행할 수있는 방법을 찾을 수 없습니다.

나는 API를 사용하는 경우

: client.execute(removeAliasMapping), 그것은 말한다 : 또한 The method execute(Action<T>) in the type JestClient is not applicable for the arguments (RemoveAliasMapping)

, 나는 AliasMapping을 실행에 노출 된 다른 API를 찾을 수 없습니다.

누구나 나를 도와 줄 수 있습니까? 가능한 경우 예를 들어주십시오.

답변

3

이 시도 :

ModifyAliases modifyAliases = new ModifyAliases.Builder(new RemoveAliasMapping.Builder("oldIndex", "alias").build()).build(); 
JestResult result = client.execute(modifyAliases);