V-7.8.0
Dev tools 常使用命令集锦
GET _search
{
"query": {
"match_all": {}
}
}
PUT /my_store
{
"settings": {
"number_of_shards": 1
},
"mappings": {
"products": {
"properties": {
"productName": {
"type": "text"
},
"size": {
"type": "keyword"
}
}
}
}
}
POST /my_store/products/_bulk
{"index":{}}
{"productName":"Latest art shirts for women in 2018 autumn","size":"X"}
{"index":{}}
{"productName":"Latest art shirts for women in 2020 autumn","size":"XX"}
GET /_cat/indices?v
shakespeare----------------------------------------------------------------------
PUT /shakespeare
{
"mappings": {
"doc": {
"properties": {
"speaker": {"type": "keyword"},
"play_name": {"type": "keyword"},
"line_id": {"type": "integer"},
"speech_number": {"type": "integer"}
}
}
}
}
POST /shakespeare/doc/_bulk
{"statusCode":413,"error":"Request Entity Too Large","message":"Payload content length greater than maximum allowed: 1048576"}
id
[1284,2396]
[2397,6174]
[6175,...
accounts--------------------------------------------------------------------------
id
[739,...
PUT /accounts
{
"mappings": {
"default": {
"properties": {
"balance": {"type": "integer"},
"account_number": {"type": "integer"}
}
}
}
}
POST /accounts/default/_bulk (default 位置 最好为 log doc ...)
logs------------------------------------------------------------------------------
× 行不通
PUT /logstash-2015.05.18
{
"mappings": {
"log": {
"properties": {
"geo": {
"properties": {
"coordinates": {
"type": "geo_point"
}
}
}
}
}
}
}
√ 行的通 最后生成的类型为默认类型_doc
PUT /logstash-2015.05.18
{
"mappings": {
"properties": {
"geo": {
"properties": {
"coordinates": {
"type": "geo_point"
}
}
}
}
}
}
POST /logstash-2015.05.18/_doc/_bulk
POST /logstash-2015.05.19/_doc/_bulk
POST /logstash-2015.05.20/_doc/_bulk
行数
logstash-2015.05.18 [101,...
logstash-2015.05.19 [1101,...