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

Comments

Projects
None yet
4 participants
@rgl
Copy link

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

This comment has been minimized.

Copy link

commented Jun 14, 2010

+1

@kimchy

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor

commented Jun 17, 2010

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

This comment has been minimized.

Copy link
Member

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").

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.