I have done deep search and I found that lucene provide this that methode : getBestFragments highlighter.getBestFragments(tokenStream, text, maxNumFragment, "...");
so with this methode we can precise to lucene to return maxNumFragment fragment (with highligted word)of fragsize characters, but there is no maxFragSize parameter in solr. this would be useful in my case if I want to highlight not only the first occurrence of a searched word but up to 1 occurrence of the same word in the highlighted text. so is it possible to add this option to solr? how and where? cheers -- View this message in context: http://www.nabble.com/Highlighting-getBestFragment-tp16608862p16608862.html Sent from the Solr - Dev mailing list archive at Nabble.com.