Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12878

FacetFieldProcessorByHashDV is reconstructing FieldInfos on every instantiation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 7.5
    • Fix Version/s: 7.6, 8.0
    • Component/s: Facet Module
    • Labels:

      Description

      The FacetFieldProcessorByHashDV constructor is currently calling:

      FieldInfo fieldInfo = fcontext.searcher.getSlowAtomicReader().getFieldInfos().fieldInfo(sf.getName());
      

      Which is reconstructing FieldInfos each time. Simply switching it to:

      FieldInfo fieldInfo = fcontext.searcher.getFieldInfos().fieldInfo(sf.getName());
      

       
      causes it to use the cached version of FieldInfos in the SolrIndexSearcher.

      On my index the FacetFieldProcessorByHashDV is 2-3 times slower than the legacy facets without this fix.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dsmiley David Smiley
                Reporter:
                tpunder Tim Underwood
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m