Digy
added a comment - 22/Feb/10 20:15 Besides passing docid+fieldname to FVH, can there be another method that accepts the original text to be highlighted?
like:
getBestFragment( final FieldQuery fieldQuery, IndexReader reader, String originalText, int fragCharSize )
So, the field content can be stored outside of lucene resulting in a smaller index.
DIGY

Koji Sekiguchi
added a comment - 22/Feb/10 23:28 getBestFragment() method needs docId and fieldName in order to get a TermPositionVector object from IndexReader when trying to make snippets.
FVH could be acceptable an array of String so that it can make snippets from String[] outside of Lucene, rather than stored values. But it is out of this thread.