>>How can i adjust the lucene highlighter to make sure >> that atleast each term is displayed in the query result
First some, basic things to sanity check: * A classic problem: are you using compatible analyzers for tokenizing the query and the document content (both index time and highlight time)? Term2 may not be being produced at all. * Are you selecting only one fragment and using a fragmenter implementation that means Term1 and Term2 don't happen to fall within the scope of this single fragment? If both of these checks turn out OK I suspect what is happening is that term2 is weighted significantly less than term1 (based on idf and query boosts) and the highlighter may be continually selecting multiple fragments with term1 in preference to selecting any fragments which only contain the lower scoring term2. If this is the case and you really want to ensure that term2 gets shown then you can use a custom Scorer implementation that influences the highlighter according to your preferences. Such an implementation could, for example, score fragments that are merely repetitions of the same "hits" (ie your term1) with a decreasing value. This would then allow the fragments with term2 to be considered more strongly for selection. Hope this helps Mark ___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]