lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalthoff, Marcus" <Marcus.Kalth...@solutionline.com>
Subject AW: boolean AND search
Date Thu, 27 Feb 2003 15:30:02 GMT
Sorry,

lucene is perfect. We had a bug in our search-engine wrapper class. 
It did a .toLowerCase() to the search string so that AND became and.

Thanks

Marcus


> -----Urspr√ľngliche Nachricht-----
> Von: Eric Isakson [mailto:Eric.Isakson@sas.com]
> Gesendet: Donnerstag, 27. Februar 2003 16:06
> An: Lucene Users List
> Betreff: RE: boolean AND search
> 
> 
> Have a look at the source for 
> org.apache.lucene.queryParser.QueryParser.jj the production 
> in the grammar for the AND operator is:
> 
>   <AND:       ("AND" | "&&") >
> 
> and I didn't see anywhere that the token "AND" was being 
> treated any different than the token "&&"
> 
> The query parser does not ignore these.
> 
> The queries
> 
> 10060 && 10040
> 
> and
> 
> 10060 AND 10040
> 
> and 
> 
> +10060 +10040
> 
> should be equivalent.
> 
> Have you tried isolating this in a test case outside of your 
> web application, that would help you be certain this is or is 
> not a Lucene problem. It should be pretty simple to test.
> 
> Eric
> 
> -----Original Message-----
> From: Kalthoff, Marcus [mailto:Marcus.Kalthoff@solutionline.com]
> Sent: Thursday, February 27, 2003 9:37 AM
> To: Lucene Users List
> Subject: AW: boolean AND search
> 
> 
> It is a web app, but I am absolutely sure it is correct. 
> I just wrote a log.debug() to prove this. 
> I suppose lucene simply ignores AND and OR, because OR is 
> default anyway.
> But it does not ignore && .
> 
> 
> > -----Urspr√ľngliche Nachricht-----
> > Von: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com]
> > Gesendet: Donnerstag, 27. Februar 2003 15:14
> > An: Lucene Users List
> > Betreff: Re: boolean AND search
> > 
> > 
> > Are you absolutely sure that those & characters are not getting URL
> > encoded (I assume this is a web app)?
> > 
> > Otis
> > 
> > --- "Kalthoff, Marcus" <Marcus.Kalthoff@solutionline.com> wrote:
> > > Hi,
> > > 
> > > I can understand that you need additional + before the 
> search-words
> > > to get a "real" AND, but what confuses me is that 
> > > 
> > > 10060 && 10040
> > > 
> > > (which should be the same as AND) does a real boolean AND like
> > > 
> > > +10060 AND +10040   
> > > 
> > > In the query syntax docu, you read "The symbol && can be used in
> > > place of the word AND.". But it is totally different. How do I
> > > explain that to my users?
> > > 
> > > 
> > > Marcus
> > > 
> > > 
> > > From: Daniel Calvo <dcalvo@ig.com.br>
> > > Subject: Boolean AND query
> > > Date: Thu, 21 Feb 2002 14:12:16 -0300
> > > Content-Type: text/plain;
> > > 	charset="iso-8859-1"
> > > 
> > > Hi,
> > > 
> > > To achieve what you want, you need to use the required operand (+)
> > > 
> > > --Daniel 
> > > 
> > > > -----Original Message-----
> > > > From: Aruna Raghavan [mailto:ArunaR@opin.com]
> > > > Sent: quinta-feira, 21 de fevereiro de 2002 13:44
> > > > To: 'Lucene Users List'
> > > > Subject: Boolean AND query
> > > > 
> > > > 
> > > > Hello,
> > > > Has anyone run into problems with boolean AND query? 
> Basically, I
> > > am using
> > > > the following code to do the query to look for 
> > > > 10060 AND 10040
> > > > 
> > > > BooleanQuery bq = new BooleanQuery();
> > > > Analyzer analyzer = new StandardAnalyzer();
> > > > Query query = QueryParser.parse(m_strKeyword, "pageText",
> > > analyzer);
> > > >  bq.add(query, true, false);
> > > > 
> > > > In this case, I am just using one query to add to bq 
> but there can
> > > be more. 
> > > > 
> > > > I am getting correct results when 10060 AND 10040 exists in the
> > > document.
> > > > But when one of them does not exist, I am still getting the same
> > > results. In
> > > > other words, AND seems to be acting like an OR. I 
> noticed this in
> > > the latest
> > > > RC4 as well as an older lucene build from before lucene joined
> > > jakarta.
> > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: 
> lucene-user-help@jakarta.apache.org
> > > 
> > 
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Tax Center - forms, calculators, tips, more
> > http://taxes.yahoo.com/
> > 
> > 
> ---------------------------------------------------------------------
> > 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
> 
> 

---------------------------------------------------------------------
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