------- Additional Comments From [hidden email] 2005-06-28 12:26 -------
(In reply to comment #4)
> Given the possibility of nested span queries, it might be best
> do this is by reindexing the field to be highlighted in ram, reuse
> the span query on it for collecting the Spans (via getSpans())
Nice. The MemoryIndex contribution would be a fast way of doing this. I've just
adapted the LIA SpanQueryTest JUnit test to work with MemoryIndex and all seems
well doing Spans against MemoryIndex. I had to expose a getReader() method on
MemoryIndex to do this.
Do you know if it is possible to rewrite a Phrase query as a SpanQuery and
preserve all the behaviour eg slop factor? For the purposes of simplifying the
highlighter code it may be easier to rewrite PhraseQuerys to Spans and then call
getSpans as you suggest.