> Hey Bryan, Thanks for the response! To make use of the > FastVectorHighlighter > you need to enable termVectors, termPositions, and termOffsets correct? > Which takes a considerable amount of space, but is good to know and I may > possibly pursue this solution as well. Just starting to look at the code > now, do you remember how substantial the change was? > > Are there any other options?
John, Yes, you do need to enable those, and yes, it takes a considerable amount of space. It has been a while, but the change itself was not too bad, mostly at the top level, isolating an interface that returns the structure you need, and transposing that into something for Solr to return. The only other issues are around queries. If FVH supports all the queries you use, great. If it's just missing something simple to deal with, like DisjunctionMaxQuery, then it's just adding another rewrite call. But if you are using the SpanQuery hierarchy, it's much trickier. I did in fact do an implementation for that, but it was not very satisfactory -- transposing unordered SpanNearQuery into the representation used by FVH was an O(n!) operation, and the complexity of the implementation was quite high, for a number of reasons including lack of FVH representation for mixed-slop phrases. I don't know of other options -- except for the one I finally wound up doing, which was writing my own highlighter, which unfortunately I am not in a position to share for reasons not my own. But the main reason for that was the SpanNearQuery support, which may not be a problem you have. It's possible that something similar could be done with the Postings highlighter, but I did not look too deeply into that, because the lack of phrase support was a blocker. -- Bryan