lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T. R. Halvorson" <>
Subject Proximity of More than Single Words?
Date Tue, 19 Jan 2010 14:40:07 GMT
For proximity expressions, the query parser documentation says, "use the 
tilde, "~", symbol at the end of a Phrase." It gives the example "jakarta 

Does this mean that proximity can only be operated on single words enquoted 
in quotation marks? To clarify the question by comparision, on some systems, 
the w/ proximity operator lets one search for:

crude w/4 "west texas"


"spot prices" w/3 "gulf coast"

The Lucene documentation seems to imply that such searches cannot be 
constructed in any straightforward way (although there might be a way to get 
the effect by going around Cobb's Hill). Or does the Lucene syntax allow the 
examples to be cast as:

"crude "west texas""~4


""spot prices" "gulf coast""~3

If not, is it a fair assessment to say that in Lucene, proximity is limited 
to being a part of phrase searching, and its function is exhausted by 
allowing a slop factor in matching phrases.

Thanks in advance for any help with this.

T. R. 

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

View raw message