Lucene .Net Searching with TermVector

Posted by Ashish on Stack Overflow See other posts from Stack Overflow or by Ashish
Published on 2009-09-11T12:03:29Z Indexed on 2010/04/04 20:13 UTC
Read the original article Hit count: 590

Filed under:

in Lucene.Net,i am creating the document for searching a word and want to display before 10 words and after 10 words.i have used TermVector.

Lucene.Net.Documents.Field fldContent =
    new Lucene.Net.Documents.Field("content", content,
        Lucene.Net.Documents.Field.Store.YES,
        Lucene.Net.Documents.Field.Index.TOKENIZED,
        Lucene.Net.Documents.Field.TermVector.WITH_POSITIONS_OFFSETS);

Can anyone help me how to find out the keyword position and extract nearest 15 words. please send some code.

Thanks

Ashish

© Stack Overflow or respective owner

Related posts about lucene.net