[ https://issues.apache.org/jira/browse/SOLR-12625?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16574303#comment-16574303 ]
Erick Erickson commented on SOLR-12625: --------------------------------------- OK, here's another cut. It's still a bit inelegant, it just stuffs a RetrieveFieldsOptimizer into SolrReturnFields. At least that's concealed from most users though and the initialization is done only once per use of srf. I'm not all that crazy about having to use s SolrReturnFields rather than ReturnFields in some places, but don't really see a lightweight alternative. {{Putting getValuesAsStrings(fieldName)}} over in SolrDocument doesn't work either as that would require a dependency on luceneCore for the "StoredField" class. So this gets rid of the opaque Object and still only initializes the RetrieveFieldsOptimizer once. It also implements your suggestion to tell the proposed solrDoc to convert all the fields to Strings up-front. I haven't tested this very much yet, putting it up for perusal. > 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org