You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by to...@apache.org on 2014/04/01 12:47:42 UTC

svn commit: r1583605 - /jackrabbit/oak/trunk/oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/query/SolrQueryIndex.java

Author: tommaso
Date: Tue Apr  1 10:47:42 2014
New Revision: 1583605

URL: http://svn.apache.org/r1583605
Log:
OAK-1657 - expand FT conditions only in absence of FT expressions

Modified:
    jackrabbit/oak/trunk/oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/query/SolrQueryIndex.java

Modified: jackrabbit/oak/trunk/oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/query/SolrQueryIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/query/SolrQueryIndex.java?rev=1583605&r1=1583604&r2=1583605&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/query/SolrQueryIndex.java (original)
+++ jackrabbit/oak/trunk/oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/query/SolrQueryIndex.java Tue Apr  1 10:47:42 2014
@@ -191,6 +191,11 @@ public class SolrQueryIndex implements F
         if (filter.getFullTextConstraint() != null) {
             queryBuilder.append(getFullTextQuery(filter.getFullTextConstraint()));
             queryBuilder.append(' ');
+        } else if (filter.getFulltextConditions() != null) {
+            Collection<String> fulltextConditions = filter.getFulltextConditions();
+            for (String fulltextCondition : fulltextConditions) {
+                queryBuilder.append(fulltextCondition).append(" ");
+            }
         }
 
         Filter.PathRestriction pathRestriction = filter.getPathRestriction();
@@ -205,10 +210,6 @@ public class SolrQueryIndex implements F
             }
         }
 
-        Collection<String> fulltextConditions = filter.getFulltextConditions();
-        for (String fulltextCondition : fulltextConditions) {
-            queryBuilder.append(fulltextCondition).append(" ");
-        }
         if (queryBuilder.length() == 0) {
             queryBuilder.append("*:*");
         }