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

DefaultSolrHighlighter should lazily create a FVH FieldQuery.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: highlighter
    • Labels:
      None

      Description

      DefaultSolrHighlighter switches between both the standard/default/classic Highlighter and the FastVectorHighlighter, depending on parameters and field options. In doHighlighting(), it loops over the docs, then loops over the highlighted fields, then decides to use one highlighter or the other. Outside of the doc loop it creates a FastVectorHighlighter instance (cheap) and a related FieldQuery object that may or may not be cheap. fvh.getFieldQuery takes an IndexReader instance and it will be used for certain queries like MultiTermQuery (e.g. wildcards). We shouldn't be doing this unless we know we'll actually need it – it should be lazily constructed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dsmiley David Smiley
                Reporter:
                dsmiley David Smiley
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: