[
https://issues.apache.org/jira/browse/SOLR-4567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13600847#comment-13600847
]
Steve Rowe commented on SOLR-4567:
----------------------------------
Here's a version, as of Solr 4.2, of the SOLR-3798 table enumerating all
possible combinations of copyField source and dest value types, expanded to
include Alex's case: copyField source pattern matching explicit field(s) - note
that destination patterns matching explicit field(s) are excluded because they
are nonsensical: the asterisk could create field names that wouldn't be the
same as the explicit field.
The following declarations are matched by the examples in the table below:
{code}
<field name="text" .../>
<field name="title" .../>
<field name="text_en" .../>
<dynamicField name="*_i" .../>
<dynamicField name="*_s" .../>
{code}
||case #||{{source}} value type||{{dest}} value type||Example||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|
|2|{color:red}{{<field> name}}{color}|{color:green}{{<dynamicField>
name}}{color}|{{<copyField {color:red}source="title"{color}
{color:green}dest="\*_s"{color}/>}}|No: "copyField only supports a dynamic
destination if the source is also dynamic"|
|3|{color:red}{{<field> name}}{color}|{color:blue}subset
pattern{color}[1]|{{<copyField {color:red}source="title"{color}
{color:blue}dest="\*_dest_sub_s"{color}/>}}|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}[2]|{{<copyField {color:red}source="title"{color}
{color:orange}dest="dest_sub_no_ast_s"{color}/>}}|Yes|
| |
|5|{color:green}{{<dynamicField> name}}{color}|{color:red}{{<field>
name}}{color}|{{<copyField {color:green}source="\*_i"{color}
{color:red}dest="title"{color}/>}}|Yes|
|6|{color:green}{{<dynamicField> name}}{color}|{color:green}{{<dynamicField>
name}}{color}|{{<copyField {color:green}source="\*_i"{color}
{color:green}dest="\*_s"{color}/>}}|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}/>}}|Yes|
|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|
| |
|9|{color:blue}subset pattern{color}[1]|{color:red}{{<field>
name}}{color}|{{<copyField {color:blue}source="\*_src_sub_i"{color}
{color:red}dest="title"{color}/>}}|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|
|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}/>}}|Yes|
|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}/>}}|Yes|
| |
|13|{color:orange}subset pattern no asterisk{color}[2]|{color:red}{{<field>
name}}{color}|{{<copyField {color:orange}source="src_sub_no_ast_i"{color}
{color:red}dest="title"{color}/>}}|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}/>}}|Yes|
|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}/>}}|Yes|
|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}/>}}|Yes|
| |
|17|{color:purple}pattern matching explicit
field(s){color}|{color:red}{{<field> name}}{color}|{{<copyField
{color:purple}source="text_*"{color} {color:red}dest="text"{color}/>}}|No:
"copyField source :'text_*' is not an explicit field and doesn't match a
dynamicField."|
|18|{color:purple}pattern matching explicit
field(s){color}|{color:green}{{<dynamicField> name}}{color}|{{<copyField
{color:purple}source="text_\*"{color} {color:green}dest="\*_s"{color}/>}}|No:
"copyField source :'text_*' is not an explicit field and doesn't match a
dynamicField."|
|19|{color:purple}pattern matching explicit field(s){color}|{color:blue}subset
pattern{color}|{{<copyField {color:purple}source="text_\*"{color}
{color:blue}dest="\*_dest_sub_s"{color}/>}}|No: "copyField source :'text_*' is
not an explicit field and doesn't match a dynamicField."|
|20|{color:purple}pattern matching explicit
field(s){color}|{color:orange}subset pattern no asterisk{color}|{{<copyField
{color:purple}source="text_\*"{color}
{color:orange}dest="dest_sub_no_ast_s"{color}/>}}|No: "copyField source
:'text_*' is not an explicit field and doesn't match a dynamicField."|
[1] A {color:blue}"subset pattern"{color} matches a subset of the language
recognized by a declared dynamic field's pattern
[2] A {color:orange}"subset pattern no asterisk"{color} is one member from the
language recognized by a declared dynamic field's pattern
> copyField source glob matching explicit field(s) stopped working in Solr 4.2
> ----------------------------------------------------------------------------
>
> Key: SOLR-4567
> URL: https://issues.apache.org/jira/browse/SOLR-4567
> Project: Solr
> Issue Type: Bug
> Components: Schema and Analysis
> Affects Versions: 4.2
> Reporter: Steve Rowe
> Assignee: Steve Rowe
>
> Alexandre Rafalovitch reported on the solr-user mailing list
> [http://markmail.org/message/sqhzxaet55wztldq] that a copyField directive
> that worked under Solr 4.1 has stopped working under Solr 4.2:
> {code:xml}
> <field name="addr_from" type="email" indexed="true" stored="true"
> required="true" />
> <field name="addr_to" type="email" multiValued="true" indexed="true"
> stored="true" required="true" />
> <copyField source="addr_*" dest="text" />
> {code}
> I'm 99% sure that matching multiple explicit fields is not the problem, but
> rather the issue is that I committed changes under SOLR-4503 to handle
> additional previously unhandled changes, but I didn't consider this case, and
> so introduced the regression. [The table on
> SOLR-3798|https://issues.apache.org/jira/browse/SOLR-3798?focusedCommentId=13591583&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13591583]
> that attempted to describe all possible combinations of copyField directives
> does not include this case.
--
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: [email protected]
For additional commands, e-mail: [email protected]