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

Hoss Man commented on SOLR-4893:
--------------------------------

{noformat}
16:39 <@sarowe1:#solr> hoss: In the patch I just put up on SOLR-4893, I added a 
new member to 
                       FieldUpdateProcessorFactory.SelectorParams, and then to 
reduce method parameter passing of each member of that 
                       structure, I switched to passing instances of the 
structure.
16:39 <@sarowe1:#solr> hoss:   I'd appreciate a sanity check on that - it looks 
like cleanup to me, but maybe there's a reason each 
                       member of SelectorParams was being passed around instead?
{noformat}

I can't think of any reason why i had it that way either.  Your patch looks 
much cleaner (although my preference would be to leave a deprecated version of 
the old createFieldNameSelector that delegates to your new version)

misc comments...

* you should change getDefaultSelector in IgnoreFieldUpdateProcessorFactory to 
take advantage of your new logic (ie: call createFieldNameSelector(...))
* i would make getBooleanArg give an explict error if the key exists multiple 
times
* to be nice to users who might not no any better, i would suggest that 
getBooleanArg should also accept a String and pass it to Boolean.valueOf
* would be good to have a test of fieldNameMatchesSchemaField in an excludes
* i don't think your ignore-not-in-schema-and-foo-name-prefix is verifying that 
the foo prefix is required?
* even with your added comments, the logic involving 
fieldNameMatchesSchemaField in shouldMutate seems kind of hairy (too hairy for 
me to be confident it's correct by reading it w/o looking at the test) .. i'm 
wondering if it can't be "unwound" a bit to make it more straight forward?
                
> Add a FieldMutatingUpdateProcessor FieldNameSelector that checks whether a 
> field matches any schema field 
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-4893
>                 URL: https://issues.apache.org/jira/browse/SOLR-4893
>             Project: Solr
>          Issue Type: Improvement
>          Components: update
>            Reporter: Steve Rowe
>            Assignee: Steve Rowe
>            Priority: Minor
>         Attachments: SOLR-4893.patch
>
>
> Add a new field update processor selector that will configure the processor 
> to select fields that match any schema field, or that don't match any schema 
> field, depending on its boolean parameter, e.g. to select fields that don't 
> match any schema field:
> {code:xml}
> <bool name="fieldNameMatchesSchemaField">false</bool>
> {code}

--
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]

Reply via email to