jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r159373 - incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/LuceneQueryBuilder.java
Date Tue, 29 Mar 2005 14:15:03 GMT
Author: mreutegg
Date: Tue Mar 29 06:15:01 2005
New Revision: 159373

URL: http://svn.apache.org/viewcvs?view=rev&rev=159373
Log:
JCR-83: Text Search Syntax Deviates from Spec
- contains function must not interpret AND OR NOT in statement as keywords

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/LuceneQueryBuilder.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/LuceneQueryBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/LuceneQueryBuilder.java?view=diff&r1=159372&r2=159373
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/LuceneQueryBuilder.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/search/lucene/LuceneQueryBuilder.java
Tue Mar 29 06:15:01 2005
@@ -310,6 +310,10 @@
             // replace unescaped ' with " and escaped ' with just '
             StringBuffer query = new StringBuffer();
             String textsearch = node.getQuery();
+            // the default lucene query parser recognizes 'AND', 'OR' and
+            // 'NOT' as keywords. when the whole statement is lowercased, this
+            // will not happen ;)
+            textsearch = textsearch.toLowerCase();
             boolean escaped = false;
             for (int i = 0; i < textsearch.length(); i++) {
                 if (textsearch.charAt(i) == '\\') {



Mime
View raw message