Skip to content
This repository has been archived by the owner on Jul 4, 2022. It is now read-only.

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

Open
auguwu opened this issue Mar 22, 2022 · 0 comments
Open

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

auguwu opened this issue Mar 22, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@auguwu
Copy link
Member

auguwu commented Mar 22, 2022

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
}
@auguwu auguwu self-assigned this Mar 22, 2022
@auguwu auguwu added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Mar 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant