Found 0 result in total
Content is empty
If you don't find the content you expect, please try another search term
Last updated:2022-01-11 13:43:17
In the Kibana console, create an index named school with a type named student. Create the following four fields for this index: name, address, age, and date. For more information about field types, see the official document Field Datatypes.
PUT school
{
"settings":{
"number_of_shards": 3,
"number_of_replicas": 1
},
"mappings":{
"student":{
"properties":{
"name":{
"type":"text"
},
"address":{
"type":"keyword"
},
"age":{
"type":"integer"
},
"date":{
"type":"date",
"format":"yyyy-MM-dd HH:mm:ss"
}
}
}
}
}
If "errors" : false is returned, data is successfully inserted.
POST /school/student/_bulk
{"index":{}}
{"name":"Zhang San","address":"Jinan, Shandong","age":"22","date":"2020-01-19 08:10:00"}
{"index":{}}
{"name":"Li Si","address":"Haidian District, Beijing","age":"21","date":"2020-02-19 09:00:00"}
{"index":{}}
{"name":"Wang Wu","address":"Changchun, Jilin","age":"23","date":"2020-02-19 10:00:00"}
GET /school/_search
{
"query": {
"match": {
"address": "Haidian District, Beijing
}
}
}
Pure Mode