You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Koji Sekiguchi (JIRA)" <ji...@apache.org> on 2010/10/13 01:04:32 UTC

[jira] Commented: (SOLR-2153) useFastVectorHighlighter does not respect hl.simple.pre/post

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

Koji Sekiguchi commented on SOLR-2153:
--------------------------------------

bq. useFastVectorHighlighter does not respect hl.simple.pre/post

Correct.

I think hl.simple.pre/post parameters are for HtmlFormatter (it implements SolrFormatter), and FVH doesn't use SolrFormatter, but uses fragListBuilder and fragmentsBuilder instead. And fragmentsBuilder respects hl.tag.pre/post:

{code}
<!-- multi-colored tag FragmentsBuilder -->
<fragmentsBuilder name="colored" class="org.apache.solr.highlight.ScoreOrderFragmentsBuilder">
  <lst name="defaults">
    <str name="hl.tag.pre"><![CDATA[
         <b style="background:yellow">,<b style="background:lawgreen">,
         <b style="background:aquamarine">,<b style="background:magenta">,
         <b style="background:palegreen">,<b style="background:coral">,
         <b style="background:wheat">,<b style="background:khaki">,
         <b style="background:lime">,<b style="background:deepskyblue">]]></str>
    <str name="hl.tag.post"><![CDATA[</b>]]></str>
  </lst>
</fragmentsBuilder>
{code}


> useFastVectorHighlighter does not respect  hl.simple.pre/post
> -------------------------------------------------------------
>
>                 Key: SOLR-2153
>                 URL: https://issues.apache.org/jira/browse/SOLR-2153
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 3.1
>         Environment: Oct 8 3.1 built from SVN, tomcat6 + solaris
>            Reporter: Trey Hyde
>
> The highlighter is returning em's instead of the b's that we are specifying in hl.simple.pre/post
> As configured in solrconfig.  This was working a while ago when we were still trying to use the non-vector highlighter (had to turn it off due to performance issues)
> {quote}<str name="hl">true</str>
>           <str name="hl.useFastVectorHighlighter">true</str>
>             <str name="hl.snippets">3</str>
>         <str name="f.title.hl.fragsize">10000</str>
>         <str name="hl.fragsize">200</str>
>         <str name="hl.mergeContiguous">true</str>
>             <str name="hl.simple.pre">&lt;b&gt;</str>
>             <str name="hl.simple.post">&lt;/b&gt;</str>{quote}
> returns
> {quote}
>  <lst name="/san/c/h/hy/hyde/hyde/spaces/intranet/1638705"> 
>     <arr name="description"> 
>       <str>&lt;em&gt;hello&lt;/em&gt; ? &lt;em&gt;world&lt;/em&gt; are you there ? 
>   
> &lt;em&gt;hello&lt;/em&gt; &lt;em&gt;world&lt;/em&gt;   </str> 
>     </arr> 
>   </lst>
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org