lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance Norskog (JIRA)" <>
Subject [jira] [Commented] (SOLR-3110) Search result comes up with truncated words at the start of highlighted fragment
Date Wed, 30 May 2012 04:01:24 GMT


Lance Norskog commented on SOLR-3110:

This appeared in the mail thread a month later:

Hi Koji,
  I am Shyam's coworker. After some looking into this issue, I believe the
problem of chopped word has to do with class'
'margin' field. It is set to 6 by default. My understanding is having margin
value of greater than zero results in truncated word when the highlighted
term is too close to beginning of a document. I was able to reset the
'margin' field by creating my custom version of
org.apache.solr.highlight.SimpleFragListBuilder and passing zero for
'margin' when calling the Lucene's SimpleFragListBuilder constructor. My
testing shows the problem has been fixed. Do you concur?

  Now couple of questions. Not sure what the purpose of this field is, could
you give the use case for it? Also could it be exposed as a parameter in
Solr so it could be set to some other value?


> Search result comes up with truncated words at the start of highlighted fragment
> --------------------------------------------------------------------------------
>                 Key: SOLR-3110
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 4.0
>         Environment: java Tomcat Solaris
>            Reporter: Shyam Bhaskaran
>              Labels: FastVectorHighlighter, boundaryScanner, highlighting, solr
> It is being observed that words are getting truncated at the start of Highlighter fragment
> Following boundary scanner settings are introduced inside in the solrconfig.xml file
> <str name="">.,!?  &\#9;&\#10;&\#13;</str>  
> If I change the settings to 
> <str name="">.,!?</str>
> then it is seen that this issue goes away but another issues comes up where the highlighted
search fragment does not start from the beginning of the sentence.
> Below is the complete list of setting we are using for boundary scanner.
>    <boundaryScanner name="simple" class="solr.highlight.SimpleBoundaryScanner" default="true">
>      <lst name="defaults">
>        <str name="">200</str>
>        <str name="">.,!? &\#9;&\#10;&\#13;</str>
>      </lst>
>    </boundaryScanner>
>    <boundaryScanner name="breakIterator" class="solr.highlight.BreakIteratorBoundaryScanner">
>      <lst name="defaults">
>        <str name="">SENTENCE</str>
>        <str name="">en</str>
>        <str name="">US</str>
>      </lst>
>    </boundaryScanner>

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message