lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jared Flatow (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-993) VariableResolverImpl addNamespace overwrites entire namespace instead of adding
Date Mon, 09 Feb 2009 15:05:00 GMT

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

Jared Flatow commented on SOLR-993:
-----------------------------------

bq. Jared, can you please update the patch for trunk? I couldn't apply the patch. I think
the path is not correct or there is a conflict.

Sure, I will update again and check, but I believe the change to StringBuilder from StringBuffer
may cause the conflict, since that occurs in the mergeAll method, which no longer exists in
the patched version.

bq. We are splitting by '.' and going into each map we find. Will this reach upto a '.' character
in a float or string value given as a parameter to a function?

The RE matches all word characters from the beginning of the previous match to the next '.'
or the end of the input. Whatever is left over at the end is considered the last token. Therefore
the name of the namespace itself must be all word characters, while the 'variable' can be
anything. This is the reason the patch is unambiguous as opposed to the current implementation.
As it is now, it will '.' split the name, trying to lookup each one, if it is not found it
will try to merge tokens back together and look it up again. This is highly dependent on the
context the name is being resolved in, whereas the patch always results in the same split
boundaries for a given name. Additionally, it has the nice property that the parent namespaces
can be determined without checking to see if they exist.


> 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.


Mime
View raw message