建表

curl -H "Content-Type: application/json" -XPUT http://127.0.0.1:9200/indextest -d '{

"settings" : {

"number_of_shards": 4,

"number_of_replicas": 0

},

"mappings": {

"_doc": {

"properties": {

"field1" : {"type": "text"},

"field2": { "type": "text"

}

}

}

}

}'

你可能感兴趣的:(建表)