code: public static EsManagedIndexBuilder create(EsClient client, ExecutionContext context,
              IndexDefinition defn,
              NodeTypes.Supplier nodeTypesSupplier,
              String workspaceName,
              ChangeSetAdapter.NodeTypePredicate matcher) {
          SimpleProblems problems = new SimpleProblems();
          validate(defn, problems);
          if (problems.hasErrors()) {
              throw new LocalIndexException(problems.toString());
          }
          return new EsManagedIndexBuilder(client, context, defn, nodeTypesSupplier, workspaceName, matcher);
      }
docs: Create a builder for the supplied index definition.
  
  @param client interface for elasticsearch cluster.
  @param context the execution context in which the index should operate;
  may not be null
  @param defn the index definition; may not be null
  @param nodeTypesSupplier the supplier of the {@link NodeTypes} instance;
  may not be null
  @param workspaceName the name of the workspace for which to build the
  index; may not be null
  @param matcher the node type matcher used to determine which nodes should
  be included in the index; may not be null
  @return the index builder; never null