lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramrakhiani, Vikas" <Vikas-Ramrakhi...@deshaw.com>
Subject RE: Searching on multiple default fields
Date Wed, 14 May 2003 08:44:05 GMT
I observed that when I use parse(QueryString, Fields[], Analyser) my
DEFALUT_BOOLEAN_OPERATOR  is changed to OR although I had set it to AND.

            MultiFieldQueryParser qp = 
                new MultiFieldQueryParser("content", myAnalyzer);  
            //QueryParser qp = 
            //new QueryParser("content", myAnalyzer);

            qp.setOperator(MultiFieldQueryParser.DEFAULT_OPERATOR_AND);
            System.out.println("Default operator is: " + qp.getOperator());

            String[] fields = getFieldList();
            System.out.println("fields: " + fields);
            
            query = qp.parse(queryString, fields, myAnalyzer);
            //query = qp.parse(queryString);

            System.out.println("The lucene query: " + query.toString(""));

Any reason for this ?

thanks for your help,
vikas.

-----Original Message-----
From: Kelvin Tan [mailto:kelvin-lists@relevanz.com]
Sent: Tuesday, May 13, 2003 1:11 PM
To: Lucene Users List
Subject: Re: Searching on multiple default fields


You can use MultiFieldQueryParser to accomplish something to that effect...

Kelvin

On Tue, 13 May 2003 13:05:42 +0530, Ramrakhiani, Vikas said:
>Hi,
>
>I am using Lucene 1.3. I want the 'default' search field to point to
>multiple fields (actually, all available fields).
>Is there API support to accomplish this ?
>
>thanks for your help,
>vikas.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message