[
https://issues.apache.org/jira/browse/SOLR-4329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13593896#comment-13593896
]
David Smiley commented on SOLR-4329:
------------------------------------
Thanks for the thorough review Hoss.
I find your chief/only concern odd: buggy code is by definition buggy and
unsurprisingly could wreak havoc. And if rogue untrusted code is getting into
your app then I think you're screwed. But, I think in a nutshell you're saying
this is perhaps too much flexibility to hang yourself with. My approach of
opening up the entire DocumentBuilder state and Lucene Document to the field
type was perhaps an over-reach -- It opens the door for creative use cases --
use-cases that admittedly I don't have right now. For example, honestly my
use-cases don't need the entire SolrInputDocument -- just the SolrInputField.
Maybe rename the interface to "SolrInputFieldAware" or "InputFieldValuesAware"?
Nor do my use-cases actually require the Lucene Document, so maybe the Fields
could be returned just like what happens in createFields(...). And at that
point, heck, SolrInputFieldAware could even be a marker interface (doesn't have
methods) and the SolrInputField could be supplied as the Object value to
createFields(field,value,boost). Maybe that last idea may be pushing it a
little as it is non-obvious but it shows that the current FieldType API is
sufficient depending on how it's called.
I like all your suggestions as well as the next steps. I held back on
documenting this class even further at first because it would have been for not
if the approach was unacceptable, and pending your thoughts above it might not
be.
> 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
> Assignee: David Smiley
> Fix For: 4.2
>
> Attachments: DocumentBuilder.java
>
>
> 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]