src/Bridge/Elasticsearch/Metadata/Document/DocumentMetadata.php
public function withIndex(string $index): self
    {
        $metadata = clone $this;
        $metadata->index = $index;

        return $metadata;
    }
public function withIndex(string $index): self
    {
        $metadata = clone $this;
        $metadata->index = $index;

        return $metadata;
    }
public function withIndex ( string $ index ) : self { $ metadata = clone $ this ; $ metadata -> index = $ index ; return $ metadata ; }
Gets a new instance with the given index.
Gets a new instance with the given index .