route: add GET/PUT /elastic/{index}/mappings
auguwu opened this issue · comments
Noel Towa commented
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
}