RE: Does QueryParser Require Upper Case Operators

2009年11月09日 10:32:33 -0800

No, they shouldn't be same.
See the difference:
Lucene.Net.QueryParsers.QueryParser p = new
Lucene.Net.QueryParsers.QueryParser("", new
Lucene.Net.Analysis.WhitespaceAnalyzer());
Console.WriteLine( p.Parse("(oil or petroleum) and prices").ToString() );
Console.WriteLine( p.Parse("(oil OR petroleum) AND prices").ToString() );
DIGY
-----Original Message-----
From: T. R. Halvorson [mailto:[email protected]] 
Sent: Monday, November 09, 2009 8:23 PM
To: [email protected]
Subject: Does QueryParser Require Upper Case Operators
Hi all. I'm new and asking a beginner's question that I have not found 
answered in the archives.
Documentation I have says the QueryParser needs the operators AND, OR, 
etc. to be in upper case. In an application under development, however, 
lower case seems to produce correct results in initial tests. I.e.,
 (oil or petroleum) and prices
is producing the same results as
 (oil OR petroleum) AND prices
T. R. Halvorson
[email protected]
www.linkedin.com/in/trhalvorson
www.ncodian.com
http://twitter.com/trhalvorson 

Reply via email to