[ 
https://issues.apache.org/jira/browse/SOLR-7327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14386742#comment-14386742
 ] 

David Smiley commented on SOLR-7327:
------------------------------------

Note that there is even some argument it shouldn't be using the top-level 
IndexReader when we can supply a TermVectorLeafReader thin wrapper around term 
vector Terms instance.  I'm unsure what the net perf trade-off would end up 
being.  I do know that the MultiTermQuery wouldn't be limited to the top-1024 
terms though (more accurate highlights), and that's good.

side-note: unfortunately the Terms implementation provided by 
CompressingTermVectorsReader is O(N) for many interactions.  If it had an FST 
based terms dictionary, this would unlikely be so; which isn't to say an FST is 
required just that efficient lookup would have been simple.

> DefaultSolrHighlighter should lazily create a FVH FieldQuery.
> -------------------------------------------------------------
>
>                 Key: SOLR-7327
>                 URL: https://issues.apache.org/jira/browse/SOLR-7327
>             Project: Solr
>          Issue Type: Improvement
>          Components: highlighter
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to