jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1482906 - /jackrabbit/oak/trunk/oak-solr-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/query/SolrQueryIndex.java
Date Wed, 15 May 2013 15:34:36 GMT
Author: thomasm
Date: Wed May 15 15:34:36 2013
New Revision: 1482906

URL: http://svn.apache.org/r1482906
Log:
OAK-307 Oak/Solr integration: support non-indexes properties

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=1482906&r1=1482905&r2=1482906&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
Wed May 15 15:34:36 2013
@@ -166,7 +166,7 @@ public class SolrQueryIndex implements Q
         return solrQuery;
     }
 
-    private String createRangeQuery(String first, String last, boolean firstIncluding, boolean
lastIncluding) {
+    private static String createRangeQuery(String first, String last, boolean firstIncluding,
boolean lastIncluding) {
         // TODO : handle inclusion / exclusion of bounds
         StringBuilder rangeQueryBuilder = new StringBuilder("[");
         rangeQueryBuilder.append(first != null ? first : "*");
@@ -176,13 +176,13 @@ public class SolrQueryIndex implements Q
         return rangeQueryBuilder.toString();
     }
 
-    private String purgePath(Filter filter) {
+    private static String purgePath(Filter filter) {
         return partialEscape(filter.getPath()).toString();
     }
 
 
     // partially borrowed from SolrPluginUtils#partialEscape
-    private CharSequence partialEscape(CharSequence s) {
+    private static CharSequence partialEscape(CharSequence s) {
         StringBuilder sb = new StringBuilder();
         for (int i = 0; i < s.length(); i++) {
             char c = s.charAt(i);
@@ -245,8 +245,8 @@ public class SolrQueryIndex implements Q
 
                     @Override
                     public PropertyValue getValue(String columnName) {
-                        String s = doc.getFieldValue(columnName).toString();
-                        return PropertyValues.newString(s);
+                        Object o = doc.getFieldValue(columnName);
+                        return o == null ? null : PropertyValues.newString(o.toString());
                     }
 
                 };



Mime
View raw message