跳到主內容

Elasticsearch REST Api

喬叔的 Elasticsearch 基礎實務班 (2021.07.24~25) - HackMD

image-1631848723417.png

image-1631848837295.png

Index與type欄位是必要的,id若省去,Elasticsearch
會為document加上自動產生的id。
– 自動產生的id為22字元長、URL-safe、Base64-encoded
string UUID。

  • 若給予的index或type名稱目前並不存在時
    ,Elasticsearch會以預設設定值自動建立該名稱的
    index或type。
  •  若不給予id時,index資料應使用POST。
  • type 建議使用 _doc (since 6.0)