[
https://issues.apache.org/jira/browse/SOLR-12625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16573893#comment-16573893
]
David Smiley commented on SOLR-12625:
-------------------------------------
Thanks for filing this Erick. I like some of what you did but I think we can
do better. The method docFetcher.optimizeForFetchingTheseFields that is
declared to return Object just feels clumsy to me. What if instead we use
ReturnFields (== SolrReturnFields) to hold this metadata on how some fields
should be returned? In this scheme, the caller would quite simply call
{{docFetcher.solrDoc(returnFields)}}. The call to {{solrDoc}} would inspect
the SolrReturnFields to see if it has the computed information that is today
present on RetrieveFieldsOptimizer, and if not then compute that. Subsequent
calls will find it and it won't need to be re-computed.
RE getValsAsString: I hear ya; it's too complex. Again; thanks for filing this
issue -- I love cleanups. Perhaps we could add a boolean to the proposed
{{solrDoc(...)}} method to declare if the values should be resolved using their
field types to appropriate objects (be it String or Number subclass or Date,
etc.). WDYT?
Your change to SolrDocument appears purely code formatting; true?
> Combine SolrDocumentFetcher and RetrieveFieldsOptimizer
> -------------------------------------------------------
>
> Key: SOLR-12625
> URL: https://issues.apache.org/jira/browse/SOLR-12625
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Erick Erickson
> Assignee: Erick Erickson
> Priority: Major
> Attachments: SOLR-12625.patch
>
>
> We have SolrDocumentFetcher and RetrieveFieldsOptimizer. The
> relationship between the two is unclear at first glance. Using
> SolrDocumentFetcher by itself is (or can be) inefficient.
> WDYT about combining the two? Is there a good reason you would want to
> use SolrDocumentFetcher _instead_ of RetrieveFieldsOptimizer?
> Ideally I'd want to be able to write code like:
> solrDocumentFetcher.fillDocValuesMostEfficiently
> That created an optimizer and "did the right thing".
> Assigning to myself to keep track, but if anyone feels motivated feel free to
> take it over.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]