lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neeraj shah <>
Subject How to get compelete sentences from best fragments in Lucene2.9.
Date Fri, 10 May 2013 05:34:12 GMT

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

How can i do this in Lucene??

With Regards,
Neeraj Kumar Shah

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message