Hi Sirish, I think I understand "within sentence" phrase search - you want the entire phrase to be within a single sentence. But can you give an example of "non sentence specific phrase search"? It's not clear to me how useful such capability would be.
Steve > -----Original Message----- > From: Sirish Vadala [mailto:sirishre...@gmail.com] > Sent: Wednesday, October 06, 2010 2:33 PM > To: java-user@lucene.apache.org > Subject: Issue with sentence specific search > > > Hello All: > > Can any one suggest me the best way to implement both sentence specific > and > non sentence specific phrase search? The user is going to have a check box > for phrase search on the screen that says 'within sentence'. If s/he > selects > 'within sentence', then I should perform sentence specific search, if not > this should be a regular non sentence specific search. > > Right now I am adding each sentence as a separate field(with the same > field > name) to the same document. Also I am setting the position increment gap > that I did by sub-classing Analyzer and overriding > Analyzer#getPositionIncrementGap() to return 10. > > Right now all I could think about is to maintain two different versions of > indexes, one for sentence specific and the other for non sentence > specific. > But, this sounds crude as it doubles the size of my entire indexes (around > 7 > gigs). I am pretty sure that there should be a better way to achieve this. > > Any hint would be highly appreciated. > Thanks. > -- > View this message in context: http://lucene.472066.n3.nabble.com/Issue- > with-sentence-specific-search-tp1644352p1644352.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org