lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: (~) opertor query....
Date Fri, 14 Dec 2007 23:26:56 GMT

:           I am parsing this query:  "Auto*  machine"~4.
:           Will it work? If yes then right now it's not working. Can
: anyone help on this?

Tt depends, what do you want it to do?  :)

If you are hoping it will match documents that contain a word that starts 
with "Auto" withing a distance of 4 words from the word "machine" then no, 
the query parser doesn't work that way.  phrase queries (aka: proximty 
queries) as supported by the QueryParser can only match simple words in 
the phrase, not other complex query types ... but you could build your own 
query parser that leveraged the SpanQuery family of queries to do 
something like this.


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

View raw message