You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2011/08/09 21:54:35 UTC

[Solr Wiki] Update of "HighlightingParameters" by AshwiniAthavale

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "HighlightingParameters" page has been changed by AshwiniAthavale:
http://wiki.apache.org/solr/HighlightingParameters?action=diff&rev1=30&rev2=31

  
  If you have a use case where you need to highlight the complete text of a field and need to highlight every instance of the search term(s) you can set hl.fragsize to a very high value (whatever it takes to include all the text for the largest value for that field), for example &hl.fragsize=50000.
  
+ However, if you want to change fragsize to a value greater than 51200 to return long document texts with highlighting, you will need to pass the same value to hl.maxAnalyzedChars parameter too. These two parameters go hand in hand and changing just the hl.fragsize would not be sufficient for highlighting in very large fields.
+ 
  == hl.mergeContiguous ==
  Collapse contiguous fragments into a single fragment.  "`true`" indicates contiguous fragments will be collapsed into single fragment.  This parameter accepts per-field overrides. This parameter makes sense for Highlighter only.
  
@@ -73, +75 @@

  == hl.simple.pre/hl.simple.post ==
  The text which appears before and after a highlighted term when using the `simple` formatter. This parameter accepts per-field overrides.
  
- The default values are "`<em>`" and "`</em>`"
- This parameter makes sense for Highlighter only. Use hl.tag.pre and hl.tag.post for FastVectorHighlighter (see example under hl.fragmentsBuilder)
+ The default values are "`<em>`" and "`</em>`" This parameter makes sense for Highlighter only. Use hl.tag.pre and hl.tag.post for FastVectorHighlighter (see example under hl.fragmentsBuilder)
  
  == hl.fragmenter ==
  Specify a text snippet generator for highlighted text.  The standard fragmenter is `gap` (which is so called because it creates fixed-sized fragments with gaps for multi-valued fields).  Another option is `regex`, which tries to create fragments that "look like" a certain regular expression.  This parameter accepts per-field overrides.  <!> [[Solr1.3]] This parameter makes sense for Highlighter only.
@@ -103, +104 @@

    </lst>
  </fragmentsBuilder>
  }}}
- 
  == hl.useFastVectorHighlighter ==
  Use FastVectorHighlighter. FastVectorHighlighter requires the field is termVectors=on, termPositions=on and termOffsets=on. This parameter accepts per-field overrides.  <!> [[Solr3.1]]
  
@@ -118, +118 @@

  == hl.regex.slop ==
  Factor by which the regex fragmenter can stray from the ideal fragment size (given by `hl.fragsize`) to accomodate the regular expression.  For instance, a slop of `0.2` with fragsize of `100` should yield fragments between `80` and `120` characters in length.  It is usually good to provide a slightly smaller fragsize when using the `regex` fragmenter.
  
- The default value is "`.6`"
- This parameter makes sense for Highlighter only.
+ The default value is "`.6`" This parameter makes sense for Highlighter only.
  
  == hl.regex.pattern ==
- The regular expression for fragmenting.  This could be used to extract sentences (see example `solrconfig.xml`)
+ The regular expression for fragmenting.  This could be used to extract sentences (see example `solrconfig.xml`) This parameter makes sense for Highlighter only.
- This parameter makes sense for Highlighter only.
  
  == hl.regex.maxAnalyzedChars ==
  Only analyze this many characters from a field when using the regex fragmenter (after which, the fragmenter produces fixed-sized fragments).  Applying a complicated regex to a huge field is expensive.
  
- The default value is "`10000`".
- This parameter makes sense for Highlighter only.
+ The default value is "`10000`". This parameter makes sense for Highlighter only.