You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by neeraj shah <ne...@gmail.com> on 2013/05/10 07:34:12 UTC

How to get compelete sentences from best fragments in Lucene2.9.

Hello,

After search when im fetching the fragments to show result like google
using method:

String[] fragments = hi.getBestFragments(tokn, contents,20);

im getting the best fragments.

When i am iterating through the fragments i get one by one all fragments.
These fragments contains search word but not the complete sentence.

I want to show user the complete sentence with additional lines ( 2 lines
first and 2 line after ) so that user can understand the meaning of
fragment.

How can i do this in Lucene??


-- 
With Regards,
Neeraj Kumar Shah
+919819474146