You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Noble Paul (JIRA)" <ji...@apache.org> on 2009/02/06 10:12:00 UTC

[jira] Created: (SOLR-1009) repeated column names result in duplicate values

repeated column names result in duplicate values
------------------------------------------------

                 Key: SOLR-1009
                 URL: https://issues.apache.org/jira/browse/SOLR-1009
             Project: Solr
          Issue Type: Bug
          Components: contrib - DataImportHandler
            Reporter: Noble Paul
            Priority: Trivial
             Fix For: 1.4
         Attachments: SOLR-1009.patch

Duplicate column names result in the same value getting copied multiple times

http://markmail.org/thread/mguseggrldkddcut

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SOLR-1009) repeated column names result in duplicate values

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar reassigned SOLR-1009:
-------------------------------------------

    Assignee: Shalin Shekhar Mangar

> repeated column names result in duplicate values
> ------------------------------------------------
>
>                 Key: SOLR-1009
>                 URL: https://issues.apache.org/jira/browse/SOLR-1009
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.4
>
>         Attachments: SOLR-1009.patch
>
>
> Duplicate column names result in the same value getting copied multiple times
> http://markmail.org/thread/mguseggrldkddcut

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-1009) repeated column names result in duplicate values

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Noble Paul updated SOLR-1009:
-----------------------------

    Attachment: SOLR-1009.patch

the fix

check if they are duplicate and create only a single destination field 

> repeated column names result in duplicate values
> ------------------------------------------------
>
>                 Key: SOLR-1009
>                 URL: https://issues.apache.org/jira/browse/SOLR-1009
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>            Priority: Trivial
>             Fix For: 1.4
>
>         Attachments: SOLR-1009.patch
>
>
> Duplicate column names result in the same value getting copied multiple times
> http://markmail.org/thread/mguseggrldkddcut

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1009) repeated column names result in duplicate values

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671412#action_12671412 ] 

Shalin Shekhar Mangar commented on SOLR-1009:
---------------------------------------------

But what if more than one xpath match? The map can contain only one value, which one should it be?

e.g.
{code:xml}
<field column="x" xpath="/root/a" />
<field column="x" xpath="/root/b/a" />
{code}

If the XML has both /root/a and /root/b/a, which value should be added to the document? Right now, one the values will get overwritten.

> repeated column names result in duplicate values
> ------------------------------------------------
>
>                 Key: SOLR-1009
>                 URL: https://issues.apache.org/jira/browse/SOLR-1009
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>            Priority: Trivial
>             Fix For: 1.4
>
>         Attachments: SOLR-1009.patch
>
>
> Duplicate column names result in the same value getting copied multiple times
> http://markmail.org/thread/mguseggrldkddcut

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1009) repeated column names result in duplicate values

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671320#action_12671320 ] 

Shalin Shekhar Mangar commented on SOLR-1009:
---------------------------------------------

Would it be better to throw an exception during validation because specifying the same column multiple times is not really valid? A user may incorrectly specify the same column name with different transformers etc. but only one of the field's value will be added to the document and the user would be left wondering why the other values are not getting picked up.

> repeated column names result in duplicate values
> ------------------------------------------------
>
>                 Key: SOLR-1009
>                 URL: https://issues.apache.org/jira/browse/SOLR-1009
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>            Priority: Trivial
>             Fix For: 1.4
>
>         Attachments: SOLR-1009.patch
>
>
> Duplicate column names result in the same value getting copied multiple times
> http://markmail.org/thread/mguseggrldkddcut

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SOLR-1009) repeated column names result in duplicate values

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar resolved SOLR-1009.
-----------------------------------------

    Resolution: Fixed

Committed revision 743280.

Thanks Noble!

I understood the patch now, we need to clearly document on the wiki that in case of single valued field, XPathEntityProcessor may overwrite values. This problem is not present with other entity processors.

> repeated column names result in duplicate values
> ------------------------------------------------
>
>                 Key: SOLR-1009
>                 URL: https://issues.apache.org/jira/browse/SOLR-1009
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>            Assignee: Shalin Shekhar Mangar
>            Priority: Trivial
>             Fix For: 1.4
>
>         Attachments: SOLR-1009.patch
>
>
> Duplicate column names result in the same value getting copied multiple times
> http://markmail.org/thread/mguseggrldkddcut

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1009) repeated column names result in duplicate values

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671410#action_12671410 ] 

Noble Paul commented on SOLR-1009:
----------------------------------

bq.Would it be better to throw an exception during validation because specifying the same column multiple times is not really valid

not really. The user reported usecase is a valid one. It may not be valid for SqlEntityProcessor but in XPathEntityProcessor he needs those fields becausehe has to put different 'xpath' . it is easy to workaround with a correct name, but it it not obvious

> repeated column names result in duplicate values
> ------------------------------------------------
>
>                 Key: SOLR-1009
>                 URL: https://issues.apache.org/jira/browse/SOLR-1009
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>            Reporter: Noble Paul
>            Priority: Trivial
>             Fix For: 1.4
>
>         Attachments: SOLR-1009.patch
>
>
> Duplicate column names result in the same value getting copied multiple times
> http://markmail.org/thread/mguseggrldkddcut

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.