lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: QueryParser
Date Tue, 19 Nov 2002 22:34:58 GMT
Maybe it would be good if you could send some unit test code this way
so that we can properly populate
org.apache.lucene.queryParser.TestQueryParser.java with tests that will
reveal bugs, such as the potential bug that you are reporting.

Thanks,
Otis



--- stephane vaucher <vaucher@LUB.UMontreal.CA> wrote:
> Hello lucene gurus,
> 
> I've been experimenting with the QueryParser supplied with lucene and
> 
> have a question. I've read from the FAQ that the grammar is the
> following:
> 
> Query ::= Clause ( [ Conjunction ] Clause ) *
> Conjunction ::= 'AND' | 'OR' | '||'
> Clause ::= [ Modifier ] [ FieldName ':' ] BasicClause [ Boost ]
> Modifier ::= '-' | '+' | '!' | 'NOT'
> BasicClause ::= ( Term | Phrase | | PrefixQuery '(' Query ')'
> PrefixQuery ::= Term '*'
> Phrase ::= '"' Term * '"'
> Boost ::= '^' DecimalDigit+ '.' DecimalDigit+
> Term ::= <a-word-or-token-to-match>
> FieldName ::= <name-of-an-indexed-field>
> 
>  From what I've gathered was that we can have a request like the
> following:
> a) (snow AND removal) OR foo
> b) (snow AND removal)^2 OR foo
> 
> However, when I print the result(query) of the parsing, I have the 
> following results:
> a) (+snow +remov al) foo --> OK
> b)  +snow +removal --> ??? I lose the foo and there is no boost
> 
> I haven't seen any posts about this case, so I don't know if I'm
> doing 
> something wrong or simply weird enough that it hasn't been tested ( I
> 
> haven't seen any tests in 
> org.apache.lucene.queryParser.TestQueryParser.java)...
> 
> My environment:
> 
> I'm using Lucene-1.2 production release
> on:
> Linux RH 7.0
> with:
> java version "1.4.1"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
> Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
> 
> Thanks,
> Stephane Vaucher
> Software designer
> CIRANO
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-user-help@jakarta.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

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


Mime
View raw message