如下:
PUT indexName
{ "settings": { "index": { "refresh_interval": "60s", "number_of_shards": "2", "number_of_replicas": "1" } }, "mappings": { "_source": { "enabled": "false" }, "properties": { "name": { "type": "text", "store": "false", "index": "true", "analyzer": "standard", "search_analyzer": "standard" }, "age": { "type": "integer", "store": "true", "index": "false" } } } }