Hi Arcadius,

I think it is a feature. If no match terms found on hl.fl fields then it 
triggers
hl.alternateField function, and if you set hl.maxAlternateFieldLength=[LENGTH],
the highlighter extracts the first [LENGTH] characters of stored data of the 
hl.fl
field. As this is the common feature of both highlighter and FVH, it doesn't 
take
into account hl.bs.type (it is a special param for boundary scanner).

For now, implement boundary scanning in your client if you want.

koji
--
http://soleami.com/blog/starting-lab-work.html

(12/09/15 0:13), Arcadius Ahouansou wrote:
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