jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r552542 - in /jackrabbit/branches/1.3/jackrabbit-core/src: main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java test/java/org/apache/jackrabbit/core/query/FulltextQueryTest.java
Date Mon, 02 Jul 2007 16:51:22 GMT
Author: jukka
Date: Mon Jul  2 09:51:21 2007
New Revision: 552542

URL: http://svn.apache.org/viewvc?view=rev&rev=552542
Log:
1.3: Merged revisions 550412 and 550443 (JCR-980)

Modified:
    jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
    jackrabbit/branches/1.3/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/FulltextQueryTest.java

Modified: jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java?view=diff&rev=552542&r1=552541&r2=552542
==============================================================================
--- jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
(original)
+++ jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/LuceneQueryBuilder.java
Mon Jul  2 09:51:21 2007
@@ -330,7 +330,7 @@
             }
             QueryParser parser = new QueryParser(fieldname, analyzer);
             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
@@ -348,11 +348,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('\\');

Modified: jackrabbit/branches/1.3/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/FulltextQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.3/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/FulltextQueryTest.java?view=diff&rev=552542&r1=552541&r2=552542
==============================================================================
--- jackrabbit/branches/1.3/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/FulltextQueryTest.java
(original)
+++ jackrabbit/branches/1.3/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/FulltextQueryTest.java
Mon Jul  2 09:51:21 2007
@@ -88,7 +88,7 @@
 
         String sql = "SELECT * FROM nt:unstructured"
                 + " WHERE \"jcr:path\" LIKE '" + testRoot + "/%"
-                + "' AND CONTAINS(., 'text ''fox jumps''')";
+                + "' AND CONTAINS(., 'text \"fox jumps\"')";
         Query q = superuser.getWorkspace().getQueryManager().createQuery(sql, Query.SQL);
         QueryResult result = q.execute();
         checkResult(result, 1);



Mime
View raw message