(10/09/22 3:24), Devshree Sane wrote: > I am using the FastVectorHighlighter for retrieving snippets from the index. > > > I am a bit confused about the parameters that are passed to the > FastVectorHighlighter.getBestFragments() method. One parameter is a document > id and another is the maximum number of fragments. Does it mean that only > the maximum number of fragments will be retrieved from document with given > id (even if there are more fragments in the same document)? > Correct. > Is there a way to get the maximum number of fragments over the whole > index(and not just 1 document)? > You need to put getBestFragments() in a loop: for( int docId : ids in whole index ){ String[] fragments = fvh.getBestFragments( ..., docId, ... ); // ... } Koji -- http://www.rondhuit.com/en/ --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org