[ https://issues.apache.org/jira/browse/SOLR-8109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14938168#comment-14938168 ]
Gus Heck commented on SOLR-8109: -------------------------------- Does FirstFieldValueUpdateProcessorFactory accept wildcards? The case that my code is designed to handle looks like this: {code} <dynamicField name="*_string" type="text_general" indexed="true" stored="true" multiValued="true" /> <dynamicField name="*_sort_string" type="string" indexed="true" stored="true" multiValued="false" /> <copyField source="*_string" dest="*_sort_string" firstValueOnly="true" /> {code} Even if this can be done with processors that accept wild cards, the configuration of the update processor in solrConfig.xml has to coordinate with schema.xml (the wildcard patterns have to match). Granted the copyfield directive has to coordinate with the dynamic field too, but I tend to prefer having things that have to coordinate next to each other in the same file. As for the weight of the code that "must happen after atomic update operations"... If you look at my code, you'll notice that the only part that gets run on a per-document basis is: {code:title=DocumentBuilder.java} if (cf.isFirstValueOnly() && destHasValues) { continue; } {code} Everything else is parsing the attribute and just passing the boolean value around (or unit tests). > Option to Copy just the first value from a multivalued field > ------------------------------------------------------------ > > Key: SOLR-8109 > URL: https://issues.apache.org/jira/browse/SOLR-8109 > Project: Solr > Issue Type: Improvement > Components: Schema and Analysis > Affects Versions: 5.3 > Reporter: Gus Heck > Attachments: SOLR-8109.patch > > > Provide a firstValueOnly boolean option for copyField -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org