I would like to find the start and end positions of a match from a lucene (Version 3.0.2 for Java) query. It seems like I should be able to get this info from Highlighter or FastVectorHighligher, but these classes seem only return a text fragment with the relevant text highlighted. Is there any way to get this info, either with a Highlighter or from the ScoreDoc itself?
Update: I found this related question: http://stackoverflow.com/questions/1311199/finding-the-position-of-search-hits-from-lucene
But I think the answer by Allasso won't work for me because my queries are phrases, not individual terms.