jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r550412 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
Date Mon, 25 Jun 2007 08:35:21 GMT
Author: mreutegg
Date: Mon Jun 25 01:35:20 2007
New Revision: 550412

URL: http://svn.apache.org/viewvc?view=rev&rev=550412
Log:
JCR-980: Single quote in contains function is not parsed correctly

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java?view=diff&rev=550412&r1=550411&r2=550412
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
Mon Jun 25 01:35:20 2007
@@ -391,7 +391,7 @@
             QueryParser parser = new QueryParser(
                     fieldname, analyzer, synonymProvider);
             parser.setOperator(QueryParser.DEFAULT_OPERATOR_AND);
-            // replace unescaped ' with " and escaped ' with just '
+            // replace escaped ' with just '
             StringBuffer query = new StringBuffer();
             String textsearch = node.getQuery();
             // the default lucene query parser recognizes 'AND' and 'NOT' as
@@ -409,11 +409,9 @@
                     }
                 } else if (textsearch.charAt(i) == '\'') {
                     if (escaped) {
-                        query.append('\'');
                         escaped = false;
-                    } else {
-                        query.append('\"');
                     }
+                    query.append(textsearch.charAt(i));
                 } else {
                     if (escaped) {
                         query.append('\\');



Mime
View raw message