jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1402136 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java
Date Thu, 25 Oct 2012 13:01:36 GMT
Author: alexparvulescu
Date: Thu Oct 25 13:01:36 2012
New Revision: 1402136

URL: http://svn.apache.org/viewvc?rev=1402136&view=rev
Log:
OAK-361 QueryEngine JCR-SQL 'ESCAPE' parsing & support
 - added lucene hack to make the escaping work

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java?rev=1402136&r1=1402135&r2=1402136&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndex.java
Thu Oct 25 13:01:36 2012
@@ -225,15 +225,19 @@ public class LuceneIndex implements Quer
                 // lucene cannot handle child-level property restrictions
                 continue;
             }
+
             String first = null;
             String last = null;
             boolean isLike = pr.isLike;
 
+            // TODO what to do with escaped tokens?
             if (pr.first != null) {
                 first = pr.first.getValue(Type.STRING);
+                first = first.replace("\\", "");
             }
             if (pr.last != null) {
                 last = pr.last.getValue(Type.STRING);
+                last = last.replace("\\", "");
             }
 
             if (isLike) {



Mime
View raw message