> For proximity expressions, the query
> parser documentation says, "use the tilde, "~", symbol at
> the end of a Phrase." It gives the example "jakarta
> apache"~10
> 
> Does this mean that proximity can only be operated on
> single words enquoted in quotation marks?

Yes if you are using QueryParser to generate your queries. It does not support 
nested proximity. But if you are constructing your queries programmatically it 
can be done with SpanQuery family.

> To clarify the
> question by comparision, on some systems, the w/ proximity
> operator lets one search for:
> 
> crude w/4 "west texas"
> 
> or
> 
> "spot prices" w/3 "gulf coast"

There is a org.apache.lucene.queryParser.surround.parser.QueryParser that 
supports nested proximity search. However it's syntax does not use quotes. 
There are two operators ordered (w) and unordered (n). Your examples can be 
translated as follows:

crude 4w (west w texax)

(spot w prices) 3w (gulf w coast)

Also surround parser do not analyze query words. There are different query 
parsers here:
http://www.lucidimagination.com/blog/2009/02/22/exploring-query-parsers/


      

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

Reply via email to