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

David Smiley commented on SOLR-4329:
------------------------------------

Can we have FieldType (and SchemaField) accept a collection?  It would look 
like:
{code}public void createFieldsAndAddToDoc(Collection vals, float boost, 
Document doc);{code}

It could have a default implementation that does what DocumentBuilder is doing 
now in addField(doc,field,val,boost) -- basically calling createField(val) for 
each value. It would also need to be mindful to not over-boost for multiple 
values.  DocumentBuilder would call it if it's getting multiple values from the 
SolrInputDocument.  In the API I suggest above, it takes care of adding the 
fields to the document, thereby allowing the potential to avoid an array 
wrapper.  Though admittedly, the API would be more consistent if it was named 
createFields() and returned an array.
                
> Have DocumentBuilder give value collections to the FieldType
> ------------------------------------------------------------
>
>                 Key: SOLR-4329
>                 URL: https://issues.apache.org/jira/browse/SOLR-4329
>             Project: Solr
>          Issue Type: New Feature
>          Components: update
>            Reporter: David Smiley
>
> I'd like to write a multi-value-configured FieldType that can return a 
> DocValue Field from its createFields().  Since DocValues holds a single value 
> per document for a field, you can only have one.  However 
> FieldType.createFields() is invoked by the DocumentBuilder once per each 
> value being indexed.
> FYI the reason I'm asking for this is for a multi-valued spatial field to 
> store its points in DocValues.

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