[
https://issues.apache.org/jira/browse/SOLR-993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671726#action_12671726
]
Jared Flatow commented on SOLR-993:
-----------------------------------
bq. If I add it after splitting the names , how will I remove the namespace
"dataimporter.request" completely without removing other variables which were
added with addTonameSpace separately?
I'm not clear why this is different than the way it is now? If
"dataimporter.request.a.b" actually refers to a mapping with key "a.b" in the
"dataimporter.request" namespace, or a mapping with key "b" in the
"dataimporter.request.a" namespace is irrelevant in the case where you want to
completely remove the namespace "datimporter.request". The difference is that
as it is implemented now, "dataimporter.request.a.b" is ambiguous as to whether
it refers to one of 4 toplevel namespaces: "dataimporter",
"dataimporter.request", "dataimporter.request.a" or "datimporter.request.a.b".
Actually, the problem lies in the current implementation since some of the
parameters could potentially be stored in different choices of namespace, thus
rendering the others effectively inaccessible. I'm just saying the hierarchy
should be somehow enforced to remove that amibguity. By enforcing the hierarchy
you ensure that all the request parameters are actually stored in the same
namespace.
In general I think you would want to prevent people from putting variables into
reserved namespaces like "dataimport.request" by documenting that they are
reserved for request parameters, that is fair warning that it is not
necessarily a safe place to keep variables. Either way, the intention of
removing the whole namespace should be the same.
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.
> 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.