Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose the mappings of a given index or index/type #222

Closed
rgl opened this issue Jun 14, 2010 · 4 comments
Closed

Expose the mappings of a given index or index/type #222

rgl opened this issue Jun 14, 2010 · 4 comments

Comments

@rgl
Copy link

rgl commented Jun 14, 2010

It would be nice to get the mappings of a given index or index/type pair by doing a GET.

For example, I would like to have something like:

  • "GET /logs/_mapping" to get all the mappings defined in the "logs" index.
  • "GET /logs/log/_mapping" to get the mappings of the "logs/log" type.
  • "GET /_mapping" to get all the mappings.

Note that this is currently possible by doing a GET of "/_cluster/state" but that also obtains a bunch of non related information, and one still has to parse the json (the mappings come in a json encoded string).

@grantr
Copy link

grantr commented Jun 14, 2010

+1

@kimchy
Copy link
Member

kimchy commented Jun 16, 2010

pushed a change to the cluster state to return native json mapping (in an array of mappings) when possible. Its an oversight on my part, I had to enhance some aspects to be able to do it, but its already there, so its a simple fix.

@lukas-vlcek
Copy link
Contributor

It would be practical to have an options to get mappings as a part of index REST API as well. (i.e. it would be possible to get more info about index via one REST request, no need to do two or more requests).

@kimchy
Copy link
Member

kimchy commented Jun 17, 2010

Expose the mappings of a given index or index/type, closed by 7b145fd. Added the ability to filter returned data from the cluster state API, and use it to expose REST GET endpoint for "/_mapping", "/{index}/_mapping", "/{index}/{type}/_mapping" ({index} can also be "_all").

ClaudioMFreitas pushed a commit to ClaudioMFreitas/elasticsearch-1 that referenced this issue Nov 12, 2019
williamrandolph pushed a commit to williamrandolph/elasticsearch that referenced this issue Jun 4, 2020
Fix elastic#222

(cherry picked from commit c47f7e50f6b4fcd7af07efedff0e080366d98deb)
mindw pushed a commit to mindw/elasticsearch that referenced this issue Sep 5, 2022
…#222)

Add uc3m ansible hosts

Approved-by: Gideon Avida
costin pushed a commit that referenced this issue Dec 6, 2022
🤖 ESQL: Merge upstream
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants