lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Walt Stoneburner" <>
Subject Proximity searching with subexpressions
Date Wed, 09 May 2007 13:18:16 GMT
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
( for span and
proximity, but have come up with nothing about such syntax or

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?

-Walt Stoneburner, <>

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

View raw message