lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: Problem searching in the same sentence
Date Thu, 16 Sep 2010 17:45:51 GMT
Try with multi valued field while indexing i.e. Add each sentence as a separate field(with
the same field name) to the same document. This would give you the results as you want.

------Original Message------
From: Sirish Vadala
Subject: Problem searching in the same sentence
Sent: Sep 16, 2010 23:09

Hello All: 

Can any one suggest me the best way to allow me to perform a sentence
specific phrase search? 

Eg: Let the indexed text be: 

If you are posting a question, please try search first. Your question may
have already been answered. Don't post repeatedly. Wait for a few days.
People will read your post by email.

Now if I search for the phrase 'post repeatedly Wait for a few', still I am
able to retrieve the document even though they are in different sentences.

Currently I am using StandardAnalyzer and this is how I am generating lucene

Field field = new Field(fieldName, validFieldValue, Field.Store.YES,

Is there a way to keep track of different sentences while indexing the
Any hint would be appreciated. 
View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:


Sent from BlackBerry®
View raw message