lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ioan Miftode <i...@obs.com>
Subject phrase search with slop seem to ignore term order
Date Fri, 02 Apr 2004 16:17:54 GMT


Hi everybody

I'm trying to do some phrase searches with slop > 0.
I noticed that if you set the slop to anything higher than 0 the order of the
terms does not matter anymore.

EG.

The field is:

The quick brown fox jumps over the lazy dog

if I search on "fox brown" with slop = 0 the document is not found
but if I set the slop to 4 (for example) the document is found.

Is this the normal behavior ? Would be nice to preserve the order of the terms.


Anyway, what I'm trying to do is:

For a query like:

"term1 term2 term3"

return all documents that have term1 followed (at some distance) by term2 
followed (at some distance) by term3.
like below.

xxxx xxxx xxxx term1 xxxx xxxx xxxxx xxx xxxxx term2 xxx xx term3 xxxx xxxx 
xxxx xxxx

What is the best way to accomplish this ?

Thanks a lot

ioan



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message