You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Alexandre Rafalovitch <ar...@gmail.com> on 2013/03/13 01:32:09 UTC

copyField with * stops working with 4.2 (related to SOLR-3798 ?)

Hello,

I have an example schema which worked in 4.1 but is failing to load in 4.2
with: "copyField source :'addr_*' is not an explicit field and doesn't
match a dynamicField".

I think this must be due to SOLR-3798, but I don't understand why even
after reading it through several times.

My schema (excerpt) is:
    <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" />

I thought this would have been a valid use case. Can someone with deeper
understanding of this aspect explain what I am missing.

Regards,
    Alex.
Personal blog: http://blog.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all at
once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD book)

Re: copyField with * stops working with 4.2 (related to SOLR-3798 ?)

Posted by Steve Rowe <sa...@gmail.com>.
I committed a fix under SOLR-4567.

On Mar 13, 2013, at 12:50 AM, Steve Rowe <sa...@gmail.com> wrote:

> Yes, this is a regression, definitely my fault.  Sorry Alex!  
> 
> The table on SOLR-3798 is missing this case: a glob matching one or more explicit fields (as opposed to dynamic fields).
> 
> I've filed a JIRA: https://issues.apache.org/jira/browse/SOLR-4567
> 
> On Mar 13, 2013, at 12:20 AM, "Jack Krupansky" <ja...@basetechnology.com> wrote:
>> And, the wiki does not note the decommissioning of a useful feature of copyField. Although, the wiki is woefully incomplete when it comes to glob patterns for fields.
> 
> I agree - I wrote what I thought would be a good addition to the wiki just above the copyField combinations table on SOLR-3798.  But it needs additional verbiage to cover Alex's case.
> 
>> Reading the table in SOLR-3798 as carefully as I can, it seems to indicate that your use case is supposed to be supported as case #9, leading me to conclude that it may simply be a bug that your use case is failing in 4.2.
>> 
>> 9    subset pattern    <field> name    <copyField source="*_src_sub_i" dest="title"/>    Yes    Yes
> 
> Alex's case is different from what I call "subset patterns" on SOLR-3798, since that's shorthand for "subset of the language accepted by the pattern for a referenced dynamic field".
> 
> I'll make a copy of that table and add a case where the source value type can be a glob matching one or more explicit fields. 
> 
> Steve
> 
> 


Re: copyField with * stops working with 4.2 (related to SOLR-3798 ?)

Posted by Jack Krupansky <ja...@basetechnology.com>.
Thanks for the clarification! Although, maybe we need to come up with some 
simpler, more clear terminology.

-- Jack Krupansky

-----Original Message----- 
From: Steve Rowe
Sent: Wednesday, March 13, 2013 12:50 AM
To: solr-user@lucene.apache.org
Subject: Re: copyField with * stops working with 4.2 (related to SOLR-3798 
?)

Yes, this is a regression, definitely my fault.  Sorry Alex!

The table on SOLR-3798 is missing this case: a glob matching one or more 
explicit fields (as opposed to dynamic fields).

I've filed a JIRA: https://issues.apache.org/jira/browse/SOLR-4567

On Mar 13, 2013, at 12:20 AM, "Jack Krupansky" <ja...@basetechnology.com> 
wrote:
> And, the wiki does not note the decommissioning of a useful feature of 
> copyField. Although, the wiki is woefully incomplete when it comes to glob 
> patterns for fields.

I agree - I wrote what I thought would be a good addition to the wiki just 
above the copyField combinations table on SOLR-3798.  But it needs 
additional verbiage to cover Alex's case.

> Reading the table in SOLR-3798 as carefully as I can, it seems to indicate 
> that your use case is supposed to be supported as case #9, leading me to 
> conclude that it may simply be a bug that your use case is failing in 4.2.
>
> 9    subset pattern    <field> name    <copyField source="*_src_sub_i" 
> dest="title"/>    Yes    Yes

Alex's case is different from what I call "subset patterns" on SOLR-3798, 
since that's shorthand for "subset of the language accepted by the pattern 
for a referenced dynamic field".

I'll make a copy of that table and add a case where the source value type 
can be a glob matching one or more explicit fields.

Steve


Re: copyField with * stops working with 4.2 (related to SOLR-3798 ?)

Posted by Steve Rowe <sa...@gmail.com>.
Yes, this is a regression, definitely my fault.  Sorry Alex!  

The table on SOLR-3798 is missing this case: a glob matching one or more explicit fields (as opposed to dynamic fields).

I've filed a JIRA: https://issues.apache.org/jira/browse/SOLR-4567

On Mar 13, 2013, at 12:20 AM, "Jack Krupansky" <ja...@basetechnology.com> wrote:
> And, the wiki does not note the decommissioning of a useful feature of copyField. Although, the wiki is woefully incomplete when it comes to glob patterns for fields.

I agree - I wrote what I thought would be a good addition to the wiki just above the copyField combinations table on SOLR-3798.  But it needs additional verbiage to cover Alex's case.

> Reading the table in SOLR-3798 as carefully as I can, it seems to indicate that your use case is supposed to be supported as case #9, leading me to conclude that it may simply be a bug that your use case is failing in 4.2.
> 
> 9    subset pattern    <field> name    <copyField source="*_src_sub_i" dest="title"/>    Yes    Yes

Alex's case is different from what I call "subset patterns" on SOLR-3798, since that's shorthand for "subset of the language accepted by the pattern for a referenced dynamic field".

I'll make a copy of that table and add a case where the source value type can be a glob matching one or more explicit fields. 

Steve



Re: copyField with * stops working with 4.2 (related to SOLR-3798 ?)

Posted by Jack Krupansky <ja...@basetechnology.com>.
Solr-4503 made the changes to copyField semantics. Indeed, it is not clear 
whether Solr-4503 (or even Solr-3798) was really intended to de-commit 
existing functionality. I mean, the normal procedure is to deprecate a 
feature long before removing it.

And, the wiki does not note the decommissioning of a useful feature of 
copyField. Although, the wiki is woefully incomplete when it comes to glob 
patterns for fields.

Reading the table in SOLR-3798 as carefully as I can, it seems to indicate 
that your use case is supposed to be supported as case #9, leading me to 
conclude that it may simply be a bug that your use case is failing in 4.2.

9    subset pattern    <field> name    <copyField source="*_src_sub_i" 
dest="title"/>    Yes    Yes

So, I'd go ahead and file this as a bug.

Steve?

https://issues.apache.org/jira/browse/SOLR-3798
https://issues.apache.org/jira/browse/SOLR-4503

The revision that made the change:

http://svn.apache.org/viewvc?view=revision&revision=1453162

-- Jack Krupansky

-----Original Message----- 
From: Alexandre Rafalovitch
Sent: Tuesday, March 12, 2013 8:32 PM
To: solr-user@lucene.apache.org
Subject: copyField with * stops working with 4.2 (related to SOLR-3798 ?)

Hello,

I have an example schema which worked in 4.1 but is failing to load in 4.2
with: "copyField source :'addr_*' is not an explicit field and doesn't
match a dynamicField".

I think this must be due to SOLR-3798, but I don't understand why even
after reading it through several times.

My schema (excerpt) is:
    <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" />

I thought this would have been a valid use case. Can someone with deeper
understanding of this aspect explain what I am missing.

Regards,
    Alex.
Personal blog: http://blog.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all at
once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD book)