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

Native get-mapping ignores index name in 2-arity version, returns all index mappings #234

Closed
joshjones opened this issue Aug 8, 2016 · 2 comments

Comments

@joshjones
Copy link

The 2-arity version of clojurewerkz.elastisch.native.index/get-mapping ignores the index-name parameter, and would have no way of retrieving mappings for the specified index-name. But beside simply returning a map of all indices, it seems that the map contains duplicate data, with cases like the following (in my example): :locindex {:mappings {:get-together {:mappings {: ... } where locindex and get-together are separate indices.

To demonstrate, I've included
output which contains the value returned from (get-mapping conn "testidx") to demonstrate the previously described behavior;
output
from the 3-arity version of the function which correctly returns the index and mapping requested; and finally, the
browser output
from getting http://localhost:9200/textidx, which shows that there is only one mapping in this index.

The expected behavior would be that calling get-mapping with the connection information and an index name only, should return a map of the index and all mappings it contains. Instead, the response is what is described above, which is all indices, plus duplicate data that makes it impossible to know what is actually a mapping in the index.

@michaelklishin
Copy link
Member

Feel free to submit a pull request against the 2.2.x-stable branch.

@joshjones
Copy link
Author

I'm going to close this as it's quite old, I'm no longer actively using elastisch, and it is clearly not something anyone else really needs at the moment.

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

2 participants