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

FacetFieldProcessorByHashDV is reconstructing FieldInfos on every instantiation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 7.5
    • 7.6, 8.0
    • Facet Module

    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

              dsmiley David Smiley
              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