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 "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2009/02/09 06:03:00 UTC

[jira] Issue Comment Edited: (SOLR-993) VariableResolverImpl addNamespace overwrites entire namespace instead of adding

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

shalinmangar edited comment on SOLR-993 at 2/8/09 9:02 PM:
--------------------------------------------------------------------

Jared, I can see your point. However I am not sure how your suggestion will work with dynamic maps where the values are computed based on the key provided to Map#get method. In that case if I add a Map to a namespace, you won't be able to iterate over the keys and find out ones which have a '.' character. How do we handle those cases?

On the whole, I understand the confusion and I'm fine either way but I'm not sure what value we are adding by making this change.

bq. Whatever you decide I hope you will also keep the log warning when a variable fails to be resolved. That will at least give a clue if template variable resolution is not working as you expect.

I think this is a good change to make. However, we need to be careful with this. With the current way of resolving variables, one may get a lot of false alarms.

      was (Author: shalinmangar):
    Jared, I can see your point. However I am not sure how your suggestion will work with dynamic maps where the values are computer based on the key provided to Map#get method. In that case if I add a Map to a namespace, you won't be able to iterate over the keys and find out ones which have a '.' character. How do we handle those cases?

On the whole, I understand the confusion and I'm fine either way but I'm not sure what value we are adding by making this change.

bq. Whatever you decide I hope you will also keep the log warning when a variable fails to be resolved. That will at least give a clue if template variable resolution is not working as you expect.

I think this is a good change to make. However, we need to be careful with this. With the current way of resolving variables, one may get a lot of false alarms.
  
> VariableResolverImpl addNamespace overwrites entire namespace instead of adding
> -------------------------------------------------------------------------------
>
>                 Key: SOLR-993
>                 URL: https://issues.apache.org/jira/browse/SOLR-993
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Jared Flatow
>            Assignee: Shalin Shekhar Mangar
>             Fix For: 1.4
>
>         Attachments: SOLR-993.patch, SOLR-993b.patch
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> The addNamespace method in VariableResolverImpl does not so much add the namespace as overwrite it. 

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