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

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

I've been thinking about a related problem: reporting of what I'm calling 
"undeclared explicit fields".

In the schema, fields can be either <field> (aka concrete, aka explicit), or 
<dynamicField> (aka pattern, aka regex, aka prototype).

There is also a third kind of thing that can be introduced by a <copyField>: an 
*undeclared* explicit field (UEF).  Here's an example from 
{{test-files/solr/collection1/conf/schema15.xml}}:

{code:xml}
<field name="copyfield_source" type="string" indexed="true" stored="true" 
multiValued="true"/>
...
<dynamicField name="*_ss"  type="string"  indexed="true"  stored="true" 
multiValued="true"/>
...
<copyField source="copyfield_source" dest="copyfield_dest_ss"/>
{code}

{{copyfield_dest_ss}} isn't declared anywhere else in the schema - this is an 
instruction to use the (first matching) dynamic field type {{*_ss}} when 
copying {{copyfield_source}} to UEF {{copyfield_dest_ss}}.

The {{schema.xml}} in {{solr/example}} has another one of these, though this 
could be rewritten to instead use {{dest="\*_s"}} and still function the same:

{code:xml}
<dynamicField name="*_s"  type="string"  indexed="true"  stored="true" />
...
<copyField source="author" dest="author_s"/>
{code}

In my (so far limited ad hoc) testing, I can't see undeclared explicit fields 
in reported copyfield sources or destinations.

I think schema info reports (LukeRequestHandler and the new schema info 
requests I'm working on in SOLR-3250) should include UEFs in their reports.

                
> 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