@@ -749,17 +749,31 @@ public void testUpdateAliases() throws Exception {
749749 {
750750 // tag::update-aliases-request
751751 IndicesAliasesRequest request = new IndicesAliasesRequest (); // <1>
752- AliasActions aliasAction = new AliasActions (AliasActions .Type .ADD ).index ("index1" ).alias ("alias1" ); // <2>
752+ AliasActions aliasAction =
753+ new AliasActions (AliasActions .Type .ADD )
754+ .index ("index1" )
755+ .alias ("alias1" ); // <2>
753756 request .addAliasAction (aliasAction ); // <3>
754757 // end::update-aliases-request
755758
756759 // tag::update-aliases-request2
757- AliasActions addIndexAction = new AliasActions (AliasActions .Type .ADD ).index ("index1" ).alias ("alias1" )
758- .filter ("{\" term\" :{\" year\" :2016}}" ); // <1>
759- AliasActions addIndicesAction = new AliasActions (AliasActions .Type .ADD ).indices ("index1" , "index2" ).alias ("alias2" )
760- .routing ("1" ); // <2>
761- AliasActions removeAction = new AliasActions (AliasActions .Type .REMOVE ).index ("index3" ).alias ("alias3" ); // <3>
762- AliasActions removeIndexAction = new AliasActions (AliasActions .Type .REMOVE_INDEX ).index ("index4" ); // <4>
760+ AliasActions addIndexAction =
761+ new AliasActions (AliasActions .Type .ADD )
762+ .index ("index1" )
763+ .alias ("alias1" )
764+ .filter ("{\" term\" :{\" year\" :2016}}" ); // <1>
765+ AliasActions addIndicesAction =
766+ new AliasActions (AliasActions .Type .ADD )
767+ .indices ("index1" , "index2" )
768+ .alias ("alias2" )
769+ .routing ("1" ); // <2>
770+ AliasActions removeAction =
771+ new AliasActions (AliasActions .Type .REMOVE )
772+ .index ("index3" )
773+ .alias ("alias3" ); // <3>
774+ AliasActions removeIndexAction =
775+ new AliasActions (AliasActions .Type .REMOVE_INDEX )
776+ .index ("index4" ); // <4>
763777 // end::update-aliases-request2
764778
765779 // tag::update-aliases-request-timeout
@@ -772,21 +786,24 @@ public void testUpdateAliases() throws Exception {
772786 // end::update-aliases-request-masterTimeout
773787
774788 // tag::update-aliases-execute
775- IndicesAliasesResponse indicesAliasesResponse = client .indices ().updateAliases (request );
789+ IndicesAliasesResponse indicesAliasesResponse =
790+ client .indices ().updateAliases (request );
776791 // end::update-aliases-execute
777792
778793 // tag::update-aliases-response
779794 boolean acknowledged = indicesAliasesResponse .isAcknowledged (); // <1>
780795 // end::update-aliases-response
781796 assertTrue (acknowledged );
782797 }
798+
783799 {
784- IndicesAliasesRequest request = new IndicesAliasesRequest (); // <1>
785- AliasActions aliasAction = new AliasActions (AliasActions .Type .ADD ).index ("index1" ).alias ("async" ); // <2>
800+ IndicesAliasesRequest request = new IndicesAliasesRequest ();
801+ AliasActions aliasAction = new AliasActions (AliasActions .Type .ADD ).index ("index1" ).alias ("async" );
786802 request .addAliasAction (aliasAction );
787803
788804 // tag::update-aliases-execute-listener
789- ActionListener <IndicesAliasesResponse > listener = new ActionListener <IndicesAliasesResponse >() {
805+ ActionListener <IndicesAliasesResponse > listener =
806+ new ActionListener <IndicesAliasesResponse >() {
790807 @ Override
791808 public void onResponse (IndicesAliasesResponse indicesAliasesResponse ) {
792809 // <1>
0 commit comments