Having poked around little it doesn't look like there's an query param to turn this on but it'd be really useful if highlighted fragments could have a character offset return somehow - maybe something like
<lst name="highlighting"> <lst name="27314523"> <arr name="content"> <str offset="600"> Lorem ipsum dolor sit amet, <em>consectetur</em> adipisicing </str> </arr> </lst> </lst> or even <lst name="highlighting"> <lst name="27314523"> <arr name="content"> <str> Lorem ipsum dolor sit amet, <em>consectetur</em> adipisicing </str> </arr> <arr name="offsets"> <int> 600 </int> </arr> </lst> </lst> It looks like org.apache.lucene.search.highlight.TextFragment has the right information to do this (i.e textStartPos) but before I start writing patches ... - I'm a duplicating exisiting work - Am I missing some reason why this is a dumb idea - Is this desirable (or, to be more succinct, if I write a patch, is it likely to be accepted?) Thanks, Simon