lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Dyer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-4047) dataimporter.functions.encodeUrl throughs Unable to encode expression: field.name with value: null
Date Fri, 23 Nov 2012 15:32:58 GMT

    [ 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}
> ...
>             <entity name="account"
>                     query="select name from accounts where account_id = '${attach.account_id}'">
>                     <entity name="img_index" processor="TikaEntityProcessor" 
>                             dataSource="bin"
>                             format="text" 
>                             url="http://example.com/data/${account.name}/attaches/${attach.item_id}/${dataimporter.functions.encodeUrl(attach.name)}">
>                             <field column="text" name="body" />
>                     </entity> 
>             </entity>
> ...
> {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


Mime
View raw message