-
Notifications
You must be signed in to change notification settings - Fork 736
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
Cannot get mapping of alias with ES1.1 #588
Comments
Should be fixed with this commit: 0b410cd |
That looks good for fixing the issue in I'm relatively new to Elastica, so I'm not sure what the result of a public function getMapping()
{
$path = '_mapping';
$response = $this->request($path, Request::GET);
$data = $response->getData();
$mapping = array_shift($data);
if (isset($mapping['mappings'][$this->getName()]['properties'])) {
return $mapping['mappings'][$this->getName()]['properties'];
}
return array();
} |
I assume you are right so I reopened the issue. Can you open a pull request with the above? |
Happy to do so, but I'm a little confused by the tests; |
Hm, good point. Seems like I mixed up some stuff :-( It would be really nice if you could directly clean that up and rename / move the functions to the right place. Sorry about that. |
Will close this one as the pull request is merged. Otherwise, please reopen it. |
The real index name now forms part of the mapping response. This is a problem because the current
getMapping
function uses the name of theIndex
being queried as the key to look for in the response. An example of this can be seen inType.php#L301
however I believe the same problem exists inIndex.php
and possibly in other places.Example
A real index named "foo".
An alias of that index named "bar".
The text was updated successfully, but these errors were encountered: