1.建立一個名字爲index的topichtml
curl -XPUT http://localhost:9200/index
2.建立一個mappingjson
curl -XPOST http://localhost:9200/index/fulltext/_mapping -H 'Content-Type:application/json' -d' { "properties": { "content": { "type": "text", "analyzer": "ik_max_word", "search_analyzer": "ik_max_word" } } }'
3.刪除一個文檔,按照id來刪除bash
curl -XDELETE 'http://localhost:9200/index3/fulltext3/272'
4.經過query來刪除文檔app
不一樣版本之間的es不太同樣,6.2的參考curl
https://www.elastic.co/guide/en/elasticsearch/reference/6.2/docs-delete-by-query.html