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

Alexandre Rafalovitch commented on SOLR-4383:
---------------------------------------------

Specifically:
1) In SqlEntityProcessor: @column is source SQL column, @name is the target 
schema field name
2) In XPathEntityProcessor: @column is the target schema field name, @xpath is 
the source XPath expression
3) In PlainTextEntityProcessor: @column is the source implicit field, @name is 
the target field name (did not test)

In Transformers: @column is target schema field name (I don't think they have 
access to actual source fields)

This causes very hard to figure out bugs like:
DIH:
      <field column="date" name="DATE" dateTimeFormat="dd MMM yyyy"/>
SCHEMA:
    <field name="date" type="fulldate" indexed="true" stored="true" 
required="true" />

The SqlEntityProcessor will pick up 'date' column from database 
(case-insensitive) 
and map it to 'DATE' schema name. 
DateFormatTransformer will then look for field as in @column, finds 'date' and 
tries to transform it. 
But we don't have 'date' field, we have 'DATE' field, so it does not get 
transformed.
The untransformed DATE field then gets submitted to schema and (must be also 
case-insensitive) fails to get parsed causing (nearly silently) skipped entity.


                
> DataImportHandler: Semantic inconsistency of column/name attribute
> ------------------------------------------------------------------
>
>                 Key: SOLR-4383
>                 URL: https://issues.apache.org/jira/browse/SOLR-4383
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler, documentation
>    Affects Versions: 4.1
>            Reporter: Alexandre Rafalovitch
>             Fix For: 5.0
>
>
> Different DIH Entity Processor assign different meaning to 'column' 
> attribute. This can cause serious confusion to beginners but can also lead to 
> extremely hard to troubleshoot subtle bugs.

--
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to