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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
- Re: QueryParser stephane vaucher
- Re: QueryParser Otis Gospodnetic
- Re: QueryParser stephane vaucher
- Re: QueryParser Lee Mallabone
- Re: QueryParser stephane vaucher
- QueryParser G�nter Kukies
- Re: QueryParser Craig Walls
- Re: QueryParser newsham
- Re: QueryParser G�nter Kukies
