Re: Word / Pharse match shown in a context

2008-01-31 Thread DURGA DEEP
I have a follow up question. Seems like if I want to use highlighting, we should store the content of the entire document that has to be indexed. d.add( new Field( FIELD_NAME, some text, Field.Store.YES, Field.Index.TOKENIZED) ); Are there better ways of acheiving this ?. Since we have

Re: Word / Pharse match shown in a context

2008-01-31 Thread Mark Miller
You don't necessarily need to store the data in Lucene, but yes it does need to be stored somewhere. Otherwise, where would the context come from? If you are not stripping stopwords or stemming or lowercasing or anything, I suppose you could rebuild it from the index... To keep from having to

Word / Pharse match shown in a context

2008-01-29 Thread DURGA DEEP
Dear All, I've been scouring through the Lucene classes. Are there any classes which can help me acheive the following ?. 1) We are an e-mail service provider. We wanted to provide a seach capability of e-mail messages via Lucene. So far we are able to index/ parse the e-mail.

Re: Word / Pharse match shown in a context

2008-01-29 Thread Mark Miller
Look at the Highlighter in contrib. It creates fragments (context) and highlights search terms in them (keywords). If you want to highlight Phrase's correctly, check out this issue which adds support for Spans and PhraseQuerys: https://issues.apache.org/jira/browse/LUCENE-794 Mark DURGA