GitHub user maphysics opened a pull request:

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

    Apache MetaModelMETAMODEL-140 Elasticsearch module unable to correctly 
process complex mappings

    These changes are to address the issues in [1] .
    
    I changed ElasticSearchDataContext.java detectTable to iterate through the
    mappingMetaData and only parse the properties element.
    
    I changed ElasticSearchMetaDataParser.java parse to split on "}," so that it
    keeps the full description of a field with the field name, and adjusted
    getMetaDataFieldTupeFromMetaDataField to handle the presence of extra
    field descriptors and the edge case of the last field which will end with
    a "}".
    
    I changed ElasticSearchMetaDataParserTest.java to test the case when a field
    has an extra descriptor by adding the index=not_analyzed tag to the
    message field in the metaDataInfo string.
    
    I also added a small test to ElasticSearchDataContextTest.java that makes 
sure that the changes addressing objects on the same level as the "properties" 
object are handled correctly.
    
    [1] https://issues.apache.org/jira/browse/METAMODEL-140

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

    $ git pull https://github.com/maphysics/metamodel master

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

    https://github.com/apache/metamodel/pull/23.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 #23
    
----
commit b7f609ac22f2a53dfe1b87eab02d2ec84a5ff7fe
Author: unknown <[email protected]>
Date:   2015-05-14T18:20:41Z

    changed ElasticSearchDataContext.java detectTable to iterate through the
    mappingMetaData and only parse the properties element
    
    changed ElasticSearchMetaDataParser.java parse to split on "}," so that it
    keeps the full description of a field with the field name, and adjusted
    getMetaDataFieldTupeFromMetaDataField to handle the presence of extra
    field descriptors and the edge case of the last field which will end with
    a "}"
    
    changed ElasticSearchMetaDataParserTest.java to test the case when a field
    has an extra descriptor by adding the index=not_analyzed tag to the
    message field in the metaDataInfo string

commit ec1aadd06910551b211132de99a82649feb2ec72
Author: unknown <[email protected]>
Date:   2015-05-14T19:32:23Z

    added ElasticSearchDataContextNonDynamicMappingTest.java to test cases
    when there are objects at the same level as the properties object

commit 159cb6a9b24a146af2341bd48ed2e6f2c569527b
Author: unknown <[email protected]>
Date:   2015-05-14T19:45:15Z

    removed unnecessary line from test

commit 8b913cc915a03711b9826ddd4fa5bb01b235725b
Author: unknown <[email protected]>
Date:   2015-05-14T20:11:38Z

    moved new test to ElasticSearchDataContextTest.java so that code would
    compile with RAT licence issues

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to