lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: How can you simulate inOrder in boolean queries
Date Tue, 07 Feb 2006 21:55:10 GMT
On Tuesday 07 February 2006 22:06, RONALD MANTAY wrote:
>     Hi, can any one help, I am new to lucene.
>   Due to requiring a specific Query syntax, I have created a bespoke query 
parser to build a boolean query which at any time may comprising a mixture 
of :
>   a)  Fuzzy terms with similarity level set according to length of term.text
>   b)  Wild Card Querys
>   c)  Term Querys
>   I would like to ability to define if the Query parser terms require to be 
in Order or not (but when in order to allow gaps in the term positions). 
>   I can not see see how I can use PhraseQuery or SpanNearQuery directly, can 
anyone point me in the right direction in how to simulate inOrder to boolean 

You could take a look at the test code for these classes, this contains
examples on their use (see eg. TestPhraseQuery and the spans directory):

And there is also another query language that has ordered and
unordered queries:

Paul Elschot

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

View raw message