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

Hoss Man commented on SOLR-306:
-------------------------------

i'm a little worried that the syntax as described would give people the wrong 
impression.    the syntax added in SOLR-226 was fairly clear because there was 
a one to one mapping between the * in the source and the * in the dest ... 
there is a lot more ambiguity here.

if <copyField source="foo_*" dest="bar" /> will copy from all incoming fields 
starting with "foo_" to the field "bar", people might reasonably assume that  
<copyField source="bar" dest="foo_*" /> will copy from the field "bar" to ALL 
fields starting with "foo_" ... where different people might have different 
assumptions about what "ALL" means ... someone might assume Solr will map it to 
every explicitly created field matching the pattern, others might assume it 
will map to every dynamicField that is based on a suffix (ie: if there are 
dynamic fields for *_string and *_text then a copyfield with a dest of foo_* 
should create foo_string and foo_text)

...the point being it could get very confusing.  it would probably be better to 
do this using a different tag name / syntax, to help it stand out as 
functionally different ... perhaps this is a good opportunity to do true regex 
based matching...

  <regexCopyField source="(name)" dest="text_$1" />


> copyFields with a dynamic destination should support static source
> ------------------------------------------------------------------
>
>                 Key: SOLR-306
>                 URL: https://issues.apache.org/jira/browse/SOLR-306
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Ryan McKinley
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: SOLR-306-CopyField.patch
>
>
> In SOLR-226, we added support for copy fields with a dynamic destination.
> We should also support dynamic copyFields with a static source:
>  <copyField source="name" dest="text_*" /> 
> This will copy the contents of "name" to "text_name"

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

Reply via email to