1,查询所有数据 curl -X GET 127.0.0.1:9200/hotkey/_search?pretty
2 查看所有索引 curl -X GET 172.16.55.222:9200/_cat/indices?v
3向索引添加数据
curl -XPOST -H 'Content-Type: application/json' http://127.0.0.1:9200/hotkey/_doc/_bulk?pretty -d '
{"index":{"_id": echo $RANDOM}}
{ "searchInput" : "数据智能","createDate":"1680221","searchType":"app"}
{"index":{"_id": echo $RANDOM}}
{ "searchInput" : "数据智能","createDate":"1680221","searchType":"app"}
'
4 模糊查找doc
curl -XGET -H "Content-Type:application/json" '127.0.0.1:9200/hotkey-prod/_search' -d'
{"query":{
"wildcard":{
"searchInput":{
"value":"*ZVJ*"
}
}
},
"from":0,
"size":100
}'
5 删除doc
curl -XDELETE 'http://localhost:9200/hotkey-prod/_doc/8de617630c504c8cbe5924049f8e09dc';