Return-Path: X-Original-To: apmail-metamodel-dev-archive@minotaur.apache.org Delivered-To: apmail-metamodel-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EE5AB17CAD for ; Thu, 14 May 2015 20:28:59 +0000 (UTC) Received: (qmail 18961 invoked by uid 500); 14 May 2015 20:28:59 -0000 Delivered-To: apmail-metamodel-dev-archive@metamodel.apache.org Received: (qmail 18933 invoked by uid 500); 14 May 2015 20:28:59 -0000 Mailing-List: contact dev-help@metamodel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@metamodel.apache.org Delivered-To: mailing list dev@metamodel.apache.org Received: (qmail 18920 invoked by uid 99); 14 May 2015 20:28:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 May 2015 20:28:59 +0000 Date: Thu, 14 May 2015 20:28:59 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@metamodel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (METAMODEL-140) Elasticsearch module unable to correctly process complex mappings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/METAMODEL-140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14544312#comment-14544312 ] ASF GitHub Bot commented on METAMODEL-140: ------------------------------------------ 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 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 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 Date: 2015-05-14T19:45:15Z removed unnecessary line from test commit 8b913cc915a03711b9826ddd4fa5bb01b235725b Author: unknown Date: 2015-05-14T20:11:38Z moved new test to ElasticSearchDataContextTest.java so that code would compile with RAT licence issues ---- > Elasticsearch module unable to correctly process complex mappings > ----------------------------------------------------------------- > > Key: METAMODEL-140 > URL: https://issues.apache.org/jira/browse/METAMODEL-140 > Project: Apache MetaModel > Issue Type: Bug > Reporter: Melissa Frei > Original Estimate: 2h > Remaining Estimate: 2h > > If multiple objects are present on the same level in the mapping as the properties object the mapping is processed in correctly. > If a field description contains more than a type, the extra descriptions are processed as erroneous fields. -- This message was sent by Atlassian JIRA (v6.3.4#6332)