Is there a way to configure Highlighter to return more pre and post text? For 
example suppose I'm searching text for "bank" from Alice in Wonderland:

 her sister
on the *bank*, and of having nothing

I would like to get more post and pre text from my result:

 Alice was beginning to get very tired of sitting by her sister
on the *bank*, and of having nothing to do:  once or twice she had
peeped into the book her sister was reading, but it had

I've tried various calls to GetBestFragments:

 string[] highlightedFragments = highlighter.GetBestFragments(new 
StandardAnalyzer(), aliceInWonderland, 1);

including bumping the 1 parameter to a larger number but the returned array 
only has one item in it. I'm not looking for other matches in the text; I want 
to expand the best matched fragment to give the user more context about the 
match.

Thanks,
Ron

Reply via email to