You could handle this problem with an XSL script on the output. It would scan for the highlighting markers and munge the text. I've done a few things with the XsltResponseWriter and I do not envy you this coding task :) but it is possible.
http://wiki.apache.org/solr/XsltResponseWriter -----Original Message----- From: Grant Ingersoll [mailto:[EMAIL PROTECTED] Sent: Friday, October 03, 2008 9:05 AM To: solr-user@lucene.apache.org Subject: Re: Controlling Length of Text Snippets Before and After Highlighted Term Solr doesn't know anything about your display. http://wiki.apache.org/solr/HighlightingParameters details how you can use different sized fragments for generating the snippets, but it is still up to you as to how much you want to display. The two need not be related. On Oct 1, 2008, at 12:35 PM, syoung wrote: > > Hi All, > > I'm not sure if there is a way to do this. I have a requirement to > display exactly 20 characters before and 20 characters after the > highlighted term. > > Thanks, > > Susan > -- > View this message in context: > http://www.nabble.com/Controlling-Length-of-Text-Snippets-Before-and-A > fter-Highlighted-Term-tp19764382p19764382.html > Sent from the Solr - User mailing list archive at Nabble.com. > -------------------------- Grant Ingersoll Lucene Helpful Hints: http://wiki.apache.org/lucene-java/BasicsOfPerformance http://wiki.apache.org/lucene-java/LuceneFAQ