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

Steve Rowe commented on SOLR-3798:
----------------------------------

Returning to the subject of this issue :) ... with the previously attached 
patch, I can see dynamic field copySource info in the response from 
{{/admin/luke?show=shema}}, but not in all combinations of possible 
{{<copyField> source}} and {{dest}} value types.  

The current situation, with the patch applied:

||case #||{{source}} value type||{{dest}} value type||Example||In 
{{/admin/luke?show=schema}} reponse?||Schema parse succeeds?||
|1|{color:red}{{<field> name}}{color}|{color:red}{{<field> 
name}}{color}|{{<copyField {color:red}source="title"{color} 
{color:red}dest="text"{color}/>}}|Yes|Yes|
|2|{color:red}{{<field> name}}{color}|{color:green}{{<dynamicField> 
name}}{color}|{{<copyField {color:red}source="title"{color} 
{color:green}dest="\*_s"{color}/>}}|N/A|No: "copyField only supports a dynamic 
destination if the source is also dynamic"|
|3|{color:red}{{<field> name}}{color}|{color:blue}subset 
pattern{color}|{{<copyField {color:red}source="title"{color} 
{color:blue}dest="\*_dest_sub_s"{color}/>}}|N/A|No: "copyField only supports a 
dynamic destination if the source is also dynamic"|
|4|{color:red}{{<field> name}}{color}|{color:orange}subset pattern no 
asterisk{color}|{{<copyField {color:red}source="title"{color} 
{color:orange}dest="dest_sub_no_ast_s"{color}/>}}|Yes|Yes|
| |
|5|{color:green}{{<dynamicField> name}}{color}|{color:red}{{<field> 
name}}{color}|{{<copyField {color:green}source="\*_i"{color} 
{color:red}dest="title"{color}/>}}|Yes|Yes|
|6|{color:green}{{<dynamicField> name}}{color}|{color:green}{{<dynamicField> 
name}}{color}|{{<copyField {color:green}source="\*_i"{color} 
{color:green}dest="\*_s"{color}/>}}|Yes|Yes|
|7|{color:green}{{<dynamicField> name}}{color}|{color:blue}subset 
pattern{color}|{{<copyField {color:green}source="\*_i"{color} 
{color:blue}dest="\*_dest_sub_s"{color}/>}}|N/A|No: "copyField dynamic 
destination must match a dynamicField."|
|8|{color:green}{{<dynamicField> name}}{color}|{color:orange}subset pattern no 
asterisk{color}|{{<copyField {color:green}source="\*_i"{color} 
{color:orange}dest="dest_sub_no_ast_s"{color}/>}}|Yes|Yes|
| |
|9|{color:blue}subset pattern{color}|{color:red}{{<field> 
name}}{color}|{{<copyField {color:blue}source="\*_src_sub_i"{color} 
{color:red}dest="title"{color}/>}}|Yes|Yes|
|10|{color:blue}subset pattern{color}|{color:green}{{<dynamicField> 
name}}{color}|{{<copyField {color:blue}source="\*_src_sub_i"{color} 
{color:green}dest="\*_s"{color}/>}}|Yes|Yes|
|11|{color:blue}subset pattern{color}|{color:blue}subset 
pattern{color}|{{<copyField {color:blue}source="\*_src_sub_i"{color} 
{color:blue}dest="\*_dest_sub_s"{color}/>}}|N/A|No: "copyField dynamic 
destination must match a dynamicField."|
|12|{color:blue}subset pattern{color}|{color:orange}subset pattern no 
asterisk{color}|{{<copyField {color:blue}source="\*_src_sub_i"{color} 
{color:orange}dest="dest_sub_no_ast_s"{color}/>}}|No|Yes|
| |
|13|{color:orange}subset pattern no asterisk{color}|{color:red}{{<field> 
name}}{color}|{{<copyField {color:orange}source="src_sub_no_ast_i"{color} 
{color:red}dest="title"{color}/>}}|Yes|Yes|
|14|{color:orange}subset pattern no 
asterisk{color}|{color:green}{{<dynamicField> name}}{color}|{{<copyField 
{color:orange}source="src_sub_no_ast_i"{color} 
{color:green}dest="\*_s"{color}/>}}|N/A|No: "copyField only supports a dynamic 
destination if the source is also dynamic"|
|15|{color:orange}subset pattern no asterisk{color}|{color:blue}subset 
pattern{color}|{{<copyField {color:orange}source="src_sub_no_ast_i"{color} 
{color:blue}dest="\*_dest_sub_s"{color}/>}}|N/A|No: "copyField only supports a 
dynamic destination if the source is also dynamic"|
|16|{color:orange}subset pattern no asterisk{color}|{color:orange}subset 
pattern no asterisk{color}|{{<copyField 
{color:orange}source="src_sub_no_ast_i"{color} 
{color:orange}dest="dest_sub_no_ast_s"{color}/>}}|No|Yes|

Hoss pointed out that cases 2 and 3 are expected failures, since Solr doesn't 
have a source name template to use when generating the destination field name.

However, I think it's a bug that cases 7, 11, 14 and 15 cause Solr to puke - 
there's no reason I can see to disallow them.

Cases 12 and 16 are directly relevant to this issue, since they are 
successfully parsed, but aren't returned in LukeRequestHandler's report.


                
> copyField logic in LukeRequestHandler is primitive, doesn't work well with 
> dynamicFields
> ----------------------------------------------------------------------------------------
>
>                 Key: SOLR-3798
>                 URL: https://issues.apache.org/jira/browse/SOLR-3798
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Hoss Man
>         Attachments: SOLR-3798.patch
>
>
> looking into SOLR-3795 i realized there is a much bigger problem with how 
> LukeRequestHandler tries to get copyfield info for fields and dynamicFields 
> the same way, and it just doesn't work.
> see the patch in SOLR-3795 for a commented out example of a test that still 
> fails (ie: trying to get the "copySource" info for a dynamicField)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to