Changing default "OR" to "AND" for QueryParser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing default "OR" to "AND" for QueryParser

ivj2324234-lucene
Hello all,

For us "OR" defaul causes confusion among the users
because they expect narrower results as they add to
the query but the oppsite happens because the terms
are or-ed.

It it possble to request QueryParser to use "AND" as
a default instead of "OR"? What API call(s) is
responsible for this?


Thanks,

Slavikas

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Changing default "OR" to "AND" for QueryParser

Richard Littin
[hidden email] wrote:

> Hello all,
>
> For us "OR" defaul causes confusion among the users
> because they expect narrower results as they add to
> the query but the oppsite happens because the terms
> are or-ed.
>
> It it possble to request QueryParser to use "AND" as
> a default instead of "OR"? What API call(s) is
> responsible for this?

QueryParser parser = new QueryParser(...);
parser.setOperator(DEFAULT_OPERATOR_AND);

Richard

>
>
> Thanks,
>
> Slavikas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> .
>


--
Richard Littin, Reel Two NZ, PO Box 1538, Hamilton, New Zealand
[hidden email] - ph: +64 7 857 0703 - fax: +64 7 857 0701
void main(){float x=0;while(putchar((long)((x<4)?(((6.6667*x-34.5)
*x+50.8333)*x+++82):(((-7.5*x+97)*x-398.5)*x+++619)))-10);}

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Parsnips 1.4

Bill Tschumy
I have just released Parsnips 1.4, a commercial PIM for storage and  
retrieval of bookmarks, notes, file URLs and snippets of text.  
Parsnips is powered by Lucene.

Please have a look at: <http://www.otherwise.com/Parsnips.html>
--
Bill Tschumy
Otherwise -- Austin, TX
http://www.otherwise.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]