<?php use ElasticsearchClientBuilder;$client = ClientBuilder::create()->setHosts(['kubernetes.docker.internal:9200'])->build();$client->indices()->create([ // 索引名'index' => 'my_index','body' => ['mappings' => ['properties' => [ // 字段名'testField' => ['type' => 'keyword',]],]]]);