增加索引
利用postMan工具發送restfulAPI添加索引庫 請求方式為put代表添加
創建索引index時映射mapping
請求URL:
使用put發送http://localhost:9200/blog1
{ "mappings": { "article": { "properties": { "id": { "type": "long", "store": true, "index":"not_analyzed" }, "title": { "type": "text", "store": true, "index":"analyzed", "analyzer":"standard" }, "content": { "type": "text", "store": true, "index":"analyzed", "analyzer":"standard" } } } } }
效果:
創建索引index后映射mapping
先使用 put 請求發送 http://localhost:9200/blog2
然后使用 post 請求發送http://localhost:9200/blog2/hello/_mapping
刪除索引
使用DELET請求發送 http://localhost:9200/blo