Beispiel #1
0
 /** Sets the aliases that will be associated with the index when it gets created */
 public CreateIndexRequest aliases(BytesReference source) {
   try (XContentParser parser = XContentHelper.createParser(source)) {
     // move to the first alias
     parser.nextToken();
     while ((parser.nextToken()) != XContentParser.Token.END_OBJECT) {
       alias(Alias.fromXContent(parser));
     }
     return this;
   } catch (IOException e) {
     throw new ElasticsearchParseException("Failed to parse aliases", e);
   }
 }