lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Walt Stoneburner" <walt.stonebur...@gmail.com>
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
(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, <wls@wwco.com>
 http://www.wwco.com/~wls/blog/

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


Mime
View raw message