According to the documentation for Lucene's Query Parser Syntax, the
tilde operator provides a proximity search.
For instance, "Harry Hallows"~6 should match the text 'Harry Potter
and the Deathly Hallows'.
And while this is fine for two token phrases, I was wondering if it
worked well for subexpressions:
( ( "alien" "ufo" "crash site" ) ( "Roswell" "NM" "New Mexico" ) ) ~10
Will this match "alien ship crashed in Roswell" in addition to "ufo
spotted hovering over New Mexico"?
I've been searching through the Lucene groups
(http://www.gossamer-threads.com/lists/lucene/java-user/) for span and
proximity, but have come up with nothing about such syntax or
capability.
Additionally, I tried entering expressions containing a tilde into
Luke and then doing an explain structure.
Surprisingly, I didn't see a difference between a simple case like "A
B" and "A B"~10 in the explanation.
Is this a problem with Luke, or did I possibly miss something trivial?
Anyhow, the more important question is: Is it possible to do proximity
searches on lists of terms?
Thanks,
-Walt Stoneburner, <[email protected]>
http://www.wwco.com/~wls/blog/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]