Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2FDD2E070 for ; Fri, 23 Nov 2012 15:33:00 +0000 (UTC) Received: (qmail 89849 invoked by uid 500); 23 Nov 2012 15:32:59 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 89793 invoked by uid 500); 23 Nov 2012 15:32:58 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 89772 invoked by uid 99); 23 Nov 2012 15:32:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Nov 2012 15:32:58 +0000 Date: Fri, 23 Nov 2012 15:32:58 +0000 (UTC) From: "James Dyer (JIRA)" To: dev@lucene.apache.org Message-ID: <1574470926.19301.1353684778765.JavaMail.jiratomcat@arcas> In-Reply-To: <1216662265.80879.1352302632966.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (SOLR-4047) dataimporter.functions.encodeUrl throughs Unable to encode expression: field.name with value: null 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/SOLR-4047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503227#comment-13503227 ] James Dyer commented on SOLR-4047: ---------------------------------- Igor, I'm looking at the data-config.xml snipped you posted and I can't figure out where the "attach" namespace comes from. Is this from a parent entity that you aren't showing, or from solrconfig.properties, or from System properties? In any case this is a pretty significant detail as your problem seem to be it cannot find "${attach.name}", right? It would be very helpful fixing this if you can write a failing unit test. Perhaps the best way is to model your test on something that already exists? Take a look at "TestNestedChildren.java", which was just added this past week: (http://svn.apache.org/repos/asf/lucene/dev/branches/branch_4x/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestNestedChildren.java) This test adds 1 document to a Solr index using nested entities, getting each of 3 fields, 1 from each entity. It then queries the index to see if the document got added and if the inner-most entity's value is part of the document. Maybe you could copy this one and make minor changes to mimic what you're trying to do? For general guidelines on contributing patches, see: http://wiki.apache.org/solr/HowToContribute > dataimporter.functions.encodeUrl throughs Unable to encode expression: field.name with value: null > -------------------------------------------------------------------------------------------------- > > Key: SOLR-4047 > URL: https://issues.apache.org/jira/browse/SOLR-4047 > Project: Solr > Issue Type: Bug > Components: contrib - DataImportHandler > Affects Versions: 4.0 > Environment: Windows 7 > Reporter: Igor Dobritskiy > Priority: Critical > Attachments: db-data-config.xml, db.sql, schema.xml, solrconfig.xml > > > For some reason dataimporter.functions.encoude URL stopped work after update to solr 4.0 from 3.5. > Here is the error > {code} > Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to encode expression: attach.name with value: null Processing Document # 1 > {code} > Here is the data import config snippet: > {code} > ... > query="select name from accounts where account_id = '${attach.account_id}'"> > dataSource="bin" > format="text" > url="http://example.com/data/${account.name}/attaches/${attach.item_id}/${dataimporter.functions.encodeUrl(attach.name)}"> > > > > ... > {code} > When I'm changing it to *not* use dataimporter.functions.encodeUrl it works but I need to url encode file names as they have special chars in theirs names. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org