You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by "T. R. Halvorson" <tr...@midrivers.com> on 2009/11/09 19:23:12 UTC
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
trh@midrivers.com
www.linkedin.com/in/trhalvorson
www.ncodian.com
http://twitter.com/trhalvorson
RE: Does QueryParser Require Upper Case Operators
Posted by Digy <di...@gmail.com>.
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:trh@midrivers.com]
Sent: Monday, November 09, 2009 8:23 PM
To: lucene-net-user@incubator.apache.org
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
trh@midrivers.com
www.linkedin.com/in/trhalvorson
www.ncodian.com
http://twitter.com/trhalvorson