[ https://issues.apache.org/jira/browse/SOLR-12782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16621194#comment-16621194 ]
David Smiley commented on SOLR-12782: ------------------------------------- The updated patch does what I said in the 2nd paragraph above. It's a nice simplification. It obsoleted comments and some code pertaining to situations where the segments have mixed docValues for a field. It should "just work". Tests pass, though I'll want to run again as I made some last-minute changes to cleanup. It'd be nice to get some peer review. Perhaps [~k317h] would like to take a look? I recall you wrote UninvertDocValuesMergePolicyFactory. > UninvertingReader can be avoided if there are no fields to uninvert > ------------------------------------------------------------------- > > Key: SOLR-12782 > URL: https://issues.apache.org/jira/browse/SOLR-12782 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) > Reporter: David Smiley > Assignee: David Smiley > Priority: Major > Attachments: SOLR-12782.patch, SOLR-12782.patch > > > Solr uses UninvertingReader to expose DocValues on fields that don't have > them, but do have indexed fields that can be inverted via the FieldCache. It > has an internal constructor that takes the input LeafReader and a mapping of > field name to UninvertingReader.Type. It builds a new FieldInfos that have > fields reflecting DocValues. There are two things I'd like to improve here: > # make this constructor private and instead insist you use a new wrap() > method that has the opportunity to return the input if there is nothing to > do. Effectively the logic today would move into this wrap method, and the > current constructor would be dead simple, and would take the FieldInfos. > # Do _not_ create a new {{FieldInfo}} object if the existing field is > suitable (it's DocValuesType can stay the same). The savings here can really > add up on machines with many indexes & segments. This is in fact what > motivated the patch. -- 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