AugustArchive / tsubasa

🐇 Tsubasa is a tiny, and simple Elasticsearch microservice to abstract searching objects!

Home Page:https://docs.floofy.dev/services/tsubasa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

route: add GET/PUT /elastic/{index}/mappings

auguwu opened this issue · comments

This is an abstraction to create, update, and retrieve index mappings on a specific index.

GET /elastic/{index}/mappings

Returns the index mappings if any, or null if not found.

200 OK

{
   "shards": Int, # Returns how many shards
   "replicas": Int, # Returns how many replicas
   "data": { # The raw mapping from Elastic
       [... index mapping ...]
    }
}

PUT /elastic/{index}/mappings

Create or updates the index mapping of the kind.

200 OK

{
    "updated": bool # Returns a boolean if it was updated or created
}