You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2006/06/06 20:56:31 UTC

[jira] Resolved: (SOLR-21) Dynamic copying of fields (allow wildcard sources in copyField)

     [ http://issues.apache.org/jira/browse/SOLR-21?page=all ]
     
Yonik Seeley resolved SOLR-21:
------------------------------

    Resolution: Fixed
     Assign To: Yonik Seeley

I just committed this.  Thanks Darren! 

I did make a tweak or two... 
- changed hasExplicitField to getFieldOrNull (a getField that returns null instead of throwing an exception) since it seems like a more general method that can avoid a hash lookup.
- throw an exception if a field being added doesn't match anything... that was the previous behavior.

do those make sense?

> Dynamic copying of fields (allow wildcard sources in copyField)
> ---------------------------------------------------------------
>
>          Key: SOLR-21
>          URL: http://issues.apache.org/jira/browse/SOLR-21
>      Project: Solr
>         Type: New Feature

>   Components: update
>  Environment: all
>     Reporter: Darren Erik Vengroff
>     Assignee: Yonik Seeley
>  Attachments: dynamicCopy.patch
>
> It would be really nice if it were possible to use wildcards to do things like:
>     <copyField source="*_t" dest="text"/>
> The above example copies all fields ending in "_t" to the "text" field.
> I've put together a patch to do this. If there are mutlitple matches, all copies are done.  If there is a match in a dynamicField, then the dynamic field is also generated, subject to the existing rules that short expressions go first.  I tried to stick to the spirit of the code as I saw it, and made what I thought were a minimal reasonable set of changes.  The patch includes some additional tests in ConvertedLegacyTest.java to test the new functionality.  That may not be the  best  place for new tests, but it beats no tests.
> I'd really like to get this, or some improved variant of it into the codebase, as it's quite important to my application.  Please review and comment/criticize as you see fit.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


RE: [jira] Resolved: (SOLR-21) Dynamic copying of fields (allow wildcard sources in copyField)

Posted by Darren Vengroff <ve...@gmail.com>.
Just updated the FAQ.  Thanks to you guys for building such a great product
for me to add a few little features to.

-D

-----Original Message-----
From: Chris Hostetter [mailto:hossman_lucene@fucit.org] 
Sent: Tuesday, June 06, 2006 12:25 PM
To: solr-dev@lucene.apache.org
Subject: Re: [jira] Resolved: (SOLR-21) Dynamic copying of fields (allow
wildcard sources in copyField)


: I just committed this.  Thanks Darren!

Congrats on your first (of what I hope will be many) commited Solr
contribution Darren!

Would you like the honor of updating the FAQ on copyField...

http://wiki.apache.org/solr/FAQ#head-6b1d9dc2c14adecfe6fc5ce86448f15fc84baab
9


-Hoss


Re: [jira] Resolved: (SOLR-21) Dynamic copying of fields (allow wildcard sources in copyField)

Posted by Chris Hostetter <ho...@fucit.org>.
: I just committed this.  Thanks Darren!

Congrats on your first (of what I hope will be many) commited Solr
contribution Darren!

Would you like the honor of updating the FAQ on copyField...

http://wiki.apache.org/solr/FAQ#head-6b1d9dc2c14adecfe6fc5ce86448f15fc84baab9


-Hoss