[ https://issues.apache.org/jira/browse/SOLR-8109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14937711#comment-14937711 ]
Gus Heck commented on SOLR-8109: -------------------------------- Sometimes when using dynamic fields, the majority of the dynamic fields generated by the input data are single valued but a few annoying fields happen to be multivalued. This forces the dynamic field to be multivalued, which precludes sorting on all fields originating from the dynamic field. At present this can only be handled by having an ingestion pipeline (or other preprocessing code) anticipate the dynamic configuration and add a second field for sorting. This creates a need for the ingestion to model (and duplicate) the dynamic field configuration. Although not always appropriate, the most basic thing such processing can do is pick the first value for the "sort" field, and ignore the rest. The patch I am attaching adds a firstValueOnly attribute to copyField in the solr schema, which provides this first basic workaround without an ingestion pipeline. > 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 > > 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