You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/08/12 22:57:45 UTC

[jira] [Commented] (METAMODEL-164) ElasticSearch parser error

    [ https://issues.apache.org/jira/browse/METAMODEL-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14694156#comment-14694156 ] 

ASF GitHub Bot commented on METAMODEL-164:
------------------------------------------

GitHub user kaspersorensen opened a pull request:

    https://github.com/apache/metamodel/pull/38

    METAMODEL-164: Fixed and refactored ES mapping parser to use real map.

    Previously the parser was (by accident I think) using the toString()
    representation of that same map which made it very vulnerable towards
    parsing issues.
    
    Fixes METAMODEL-164

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kaspersorensen/metamodel METAMODEL-164

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/metamodel/pull/38.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #38
    
----
commit 6f4958f1e916c8cf4560da8cb04cfb53ff578764
Author: Kasper Sørensen <i....@gmail.com>
Date:   2015-08-12T20:56:52Z

    METAMODEL-164: Fixed and refactored ES mapping parser to use real map.
    
    Previously the parser was (by accident I think) using the toString()
    representation of that same map which made it very vulnerable towards
    parsing issues.

----


> ElasticSearch parser error
> --------------------------
>
>                 Key: METAMODEL-164
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-164
>             Project: Apache MetaModel
>          Issue Type: Bug
>            Reporter: Kasper Sørensen
>
> I am seeing this behaviour on some of my ES indices. Think we still have some snags in the metadata/mapping parser of the ES module.
> {code}
> ERROR 12:52:43 ElasticSearchDataContext - Unexpected error during detectTable for document type 'foo'
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> 	at java.lang.String.substring(String.java:1911)
> 	at org.apache.metamodel.elasticsearch.ElasticSearchMetaDataParser.getNameFromMetaDataField(ElasticSearchMetaDataParser.java:69)
> 	at org.apache.metamodel.elasticsearch.ElasticSearchMetaDataParser.parse(ElasticSearchMetaDataParser.java:52)
> 	at org.apache.metamodel.elasticsearch.ElasticSearchDataContext.detectTable(ElasticSearchDataContext.java:236)
> 	at org.apache.metamodel.elasticsearch.ElasticSearchDataContext.detectSchema(ElasticSearchDataContext.java:188)
> 	at org.apache.metamodel.elasticsearch.ElasticSearchDataContext.<init>(ElasticSearchDataContext.java:135)
> 	at ...
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)