Hello.

I am using the fastVectorHighlighter in Solr3.5 to highight  and truncate
the summary of my results.

The standard breakIterator is being used with hl.bs.type = WORD as
per http://lucidworks.lucidimagination.com/display/solr/Highlighting

Search is being performed on the document title and summary.

In my edismax requesthandler, I have as default:

<str name="hl.useFastVectorHighlighter">true</str>
<str name="hl.fl">summary</str>
<str name="f.summary.hl.alternateField">summary</str>


A simplified query looks like this:

/solr/search?q=help&hl=true&f.summary.hl.fragsize=250&f.summary.hl.maxAlternateFieldLength=250

So, I am truncating only the summary.

1- When a search term is found in the decription, everyting works well as
expected
and the summary is truncated and contains whole words only (the
breakIterator is being applied properly)

2- However, when there is no match in the summary, then
the f.summary.hl.alternateField quicks-in and the summary returned is often
truncated in the middle of a word (i.e we may get "peo" instead of
"people").
This lets me suppose that the breakIterator is not applied to
f.summary.hl.alternateField.


My question is: how to return full word truncation when summary is fetched
from  f.summary.hl.alternateField ? (i.e no match in summary)
Or is there any other way I could get proper truncation when there is no
match in the summary?


 Thank you very much.

Arcadius

Reply via email to