lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stefano coppi" <stefano.co...@gmail.com>
Subject proximity search
Date Wed, 28 May 2008 09:36:15 GMT
Hello everyone,

I'm testing the use of proximity search operator (~) in Lucene.
I noticed a strange behaviour when the terms in the text are not in the same
order of the query.
Here are some examples:

 text: AA BB
query: "AA BB"~0
result: true

 text: AA ZZ BB
query: "AA BB"~0
result: false

 text: AA ZZ BB
query: "AA BB"~1
result: true

 text: BB AA
query: "AA BB"~0 why the result is false? Aren't BB AA contigous?
result: false

 text: BB AA
query: "AA BB"~1
result: false

 text: BB AA
query: "AA BB"~2 why with proximity=2 the result is true??
result: true

 text: BB ZZ AA
query: "AA BB"~2
result: false

text: BB ZZ AA
query: "A B"~3 why with proximity=3 the result is true??
result: true

text: AA ZZ BB CC
query; "AA BB CC"~0
result: false

 text: AA ZZ BB CC
query; "AA BB CC"~1
result: true

 text: CC BB  AA
query; "AA BB CC"~3
result: false

 text: CC BB  AA
query; "AA BB CC"~4
result: true

 text: CC AA BB
query; "AA BB CC"~2
result: false

 text: CC AA BB
query; "AA BB CC"~3
result: true

Does anyone know why Lucene behaves in that way??

Thanks,
Eng. Stefano Coppi

Information Systems Consultant

IC Technology s.r.l. - Gruppo InfoCamere SCpA
Via Bertolini, 37/C
70125 - Bari - Italy

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message