[ https://issues.apache.org/jira/browse/SOLR-5544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13846166#comment-13846166 ]
MANISH KUMAR commented on SOLR-5544: ------------------------------------ [~markus17] There is no configuration that needs to be done to use FVH. If there is one please it will be helpful. The method useFastVectorHighlighter in DefaultSolrHighLighter only checks if a field stores TermOffsets and TermPositions. In case its false, the warning is printed. private boolean useFastVectorHighlighter( SolrParams params, IndexSchema schema, String fieldName ){ SchemaField schemaField = schema.getFieldOrNull( fieldName ); if( schemaField == null ) return false; boolean useFvhParam = params.getFieldBool( fieldName, HighlightParams.USE_FVH, false ); if( !useFvhParam ) return false; boolean termPosOff = schemaField.storeTermPositions() && schemaField.storeTermOffsets(); if( !termPosOff ) { log.warn( "Solr will use Highlighter instead of FastVectorHighlighter because {} field does not store TermPositions and TermOffsets.", fieldName ); } return termPosOff; } So IMO, there should be a check on whether FVH has been enabled or not. As the code suggests, this check is not there, presuming all fields will be storing TermOffsets and TermPositions seems unfair to me. The WARNING makes sense only in case when use of FVH is a conscious decision by the user. > Log spamming by DefaultSolrHighlighter > -------------------------------------- > > Key: SOLR-5544 > URL: https://issues.apache.org/jira/browse/SOLR-5544 > Project: Solr > Issue Type: Improvement > Components: highlighter > Affects Versions: 4.0 > Reporter: MANISH KUMAR > Priority: Minor > > In DefaultSolrHighlighter.java > The method useFastVectorHighlighter has > log.warn( "Solr will use Highlighter instead of FastVectorHighlighter > because {} field does not store TermPositions and TermOffsets.", fieldName ); > Above method gets called each field and there could be cases where > TermPositions & TermOffsets are not stored. > The above line causes huge spamming of logs. > It should be at max a DEBUG level log which will give flexibility of turning > it off in production environments. -- This message was sent by Atlassian JIRA (v6.1.4#6159) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org