lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sirish Vadala <>
Subject Issue with sentence specific search
Date Wed, 06 Oct 2010 18:32:40 GMT

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. 
View this message in context:
Sent from the Lucene - Java Users mailing list archive at

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

View raw message