lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramrakhiani, Vikas" <>
Subject Unable to change default boolean operator to AND
Date Wed, 16 Apr 2003 06:07:38 GMT
I was trying to implement default boolean operator AND in the demo code
I did the following :-

        QueryParser qp = new QueryParser("contents", analyzer);
        System.out.println("Value for AND operator is: " + 
	Query query = qp.parse(line, "contents", analyzer);
        System.out.println("Query is " + query);
	System.out.println("Searching for: " + query.toString("contents"));
        System.out.println("Operator is: " + qp.getOperator());

But what I get is still the default OR opertor:

Query: asd asd 
Value for AND operator is: 1
Query is contents:asd contents:asd
Searching for: asd asd
Operator is: 1

What am I doing wrong ?

thanks for your help,

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

View raw message