jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1481842 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: query/ast/FullTextSearchImpl.java spi/query/QueryIndex.java
Date Mon, 13 May 2013 13:28:34 GMT
Author: thomasm
Date: Mon May 13 13:28:34 2013
New Revision: 1481842

URL: http://svn.apache.org/r1481842
Log:
OAK-622 Improve QueryIndex interface (FulltextQueryIndex interface)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/FullTextSearchImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/FullTextSearchImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/FullTextSearchImpl.java?rev=1481842&r1=1481841&r2=1481842&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/FullTextSearchImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/FullTextSearchImpl.java
Mon May 13 13:28:34 2013
@@ -32,6 +32,7 @@ import org.apache.jackrabbit.oak.commons
 import org.apache.jackrabbit.oak.query.ast.ComparisonImpl.LikePattern;
 import org.apache.jackrabbit.oak.query.index.FilterImpl;
 import org.apache.jackrabbit.oak.spi.query.PropertyValues;
+import org.apache.jackrabbit.oak.spi.query.QueryIndex.FulltextQueryIndex;
 
 /**
  * A fulltext "contains(...)" condition.
@@ -100,6 +101,10 @@ public class FullTextSearchImpl extends 
 
     @Override
     public boolean evaluate() {
+        if (selector.index instanceof FulltextQueryIndex) {
+            return true;
+        }
+        
         StringBuilder buff = new StringBuilder();
         if (relativePath == null && propertyName != null) {
             PropertyValue p = selector.currentProperty(propertyName);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java?rev=1481842&r1=1481841&r2=1481842&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/query/QueryIndex.java
Mon May 13 13:28:34 2013
@@ -103,6 +103,16 @@ public interface QueryIndex {
      */
     String getIndexName();
 
+    /**
+     * A maker interface which means this index supports may support more than
+     * just the minimal fulltext query syntax. If this index is used, then the
+     * query engine does not verify the fulltext constraint(s) for the given
+     * selector.
+     */
+    public interface FulltextQueryIndex extends QueryIndex {
+        // marker interface
+    }
+
 //    /**
 //     * Return the possible index plans for the given filter and sort order.
 //     * Please note this method is supposed to run quickly. That means it should



Mime
View raw message