You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "Dennis Du Krøger (JIRA)" <ji...@apache.org> on 2016/05/03 11:59:13 UTC
[jira] [Created] (METAMODEL-249) Jest/REST client does not support
aliases
Dennis Du Krøger created METAMODEL-249:
------------------------------------------
Summary: Jest/REST client does not support aliases
Key: METAMODEL-249
URL: https://issues.apache.org/jira/browse/METAMODEL-249
Project: Apache MetaModel
Issue Type: Bug
Affects Versions: 4.5.2
Reporter: Dennis Du Krøger
When using an alias for an ElasticSearch index, detectSchema will fail, since we're looking for the mappings of the alias, but ElasticSearch will return the mappings using its real name, at least 1.7.2 in the configuration used by the Danish CVR:
e.g. http://distribution.virk.dk/cvr-permanent/_mapping (sorry, not public) will return this mapping:
{code:javascript}
{
"cvr-permanent-prod-20151209": {
"mappings": {
{code}
Since we do {{jestResult.getJsonObject().getAsJsonObject(indexName)}} that will end in an NPE.
I think we'll need to check the aliases mapping to make sure to always use the real index, at least for the getmapping result (if we want to use it for everything including the actual request, we need to make sure that there's no way to block requesting it directly)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)