jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1449774 - in /jackrabbit/oak/trunk: oak-solr-embedded/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/embedded/ oak-solr-embedded/src/main/resources/solr/oak/conf/ oak-solr-remote/src/main/java/org/apache/jackrabbit/oak/plugins/...
Date Mon, 25 Feb 2013 16:41:51 GMT
Author: tommaso
Date: Mon Feb 25 16:41:51 2013
New Revision: 1449774

URL: http://svn.apache.org/r1449774
Log:
OAK-653 - added first special handling (binary fields) for binaries in configurations

Modified:
    jackrabbit/oak/trunk/oak-solr-embedded/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/embedded/EmbeddedSolrConfiguration.java
    jackrabbit/oak/trunk/oak-solr-embedded/src/main/resources/solr/oak/conf/schema.xml
    jackrabbit/oak/trunk/oak-solr-remote/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/http/RemoteSolrConfigurationProvider.java

Modified: jackrabbit/oak/trunk/oak-solr-embedded/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/embedded/EmbeddedSolrConfiguration.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-solr-embedded/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/embedded/EmbeddedSolrConfiguration.java?rev=1449774&r1=1449773&r2=1449774&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-solr-embedded/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/embedded/EmbeddedSolrConfiguration.java
(original)
+++ jackrabbit/oak/trunk/oak-solr-embedded/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/embedded/EmbeddedSolrConfiguration.java
Mon Feb 25 16:41:51 2013
@@ -16,6 +16,8 @@
  */
 package org.apache.jackrabbit.oak.plugins.index.solr.embedded;
 
+import javax.jcr.PropertyType;
+
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.plugins.index.solr.OakSolrConfiguration;
 import org.apache.jackrabbit.oak.spi.query.Filter;
@@ -32,6 +34,10 @@ public class EmbeddedSolrConfiguration i
 
     @Override
     public String getFieldNameFor(Type<?> propertyType) {
+        if (Type.BINARIES.equals(propertyType) || Type.BINARY.equals(propertyType)) {
+            // TODO : use Tika / SolrCell here
+            return propertyType.toString() + "_bin";
+        }
         return null;
     }
 

Modified: jackrabbit/oak/trunk/oak-solr-embedded/src/main/resources/solr/oak/conf/schema.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-solr-embedded/src/main/resources/solr/oak/conf/schema.xml?rev=1449774&r1=1449773&r2=1449774&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-solr-embedded/src/main/resources/solr/oak/conf/schema.xml (original)
+++ jackrabbit/oak/trunk/oak-solr-embedded/src/main/resources/solr/oak/conf/schema.xml Mon
Feb 25 16:41:51 2013
@@ -96,13 +96,14 @@
                    geo="true" distErrPct="0.025" maxDistErr="0.000009" units="degrees" />
 
         <fieldType name="currency" class="solr.CurrencyField" precisionStep="8" defaultCurrency="USD"
currencyConfig="currency.xml" />
-
+        <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField"/>
     </types>
     <fields>
         <field name="path_exact" type="string" indexed="true" stored="true"/>
         <field name="path_child" type="children_path" indexed="true" stored="false"/>
         <field name="path_anc" type="parent_path" indexed="true" stored="false"/>
         <field name="path_des" type="descendent_path" indexed="true" stored="false"/>
+        <field name="ignored" type="ignored" multiValued="true"/>
         <field name="catch_all" type="text_general" indexed="true" stored="false" multiValued="true"/>
         <field name="_version_" type="long" indexed="true" stored="true"/>
 

Modified: jackrabbit/oak/trunk/oak-solr-remote/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/http/RemoteSolrConfigurationProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-solr-remote/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/http/RemoteSolrConfigurationProvider.java?rev=1449774&r1=1449773&r2=1449774&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-solr-remote/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/http/RemoteSolrConfigurationProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-solr-remote/src/main/java/org/apache/jackrabbit/oak/plugins/index/solr/http/RemoteSolrConfigurationProvider.java
Mon Feb 25 16:41:51 2013
@@ -89,6 +89,10 @@ public class RemoteSolrConfigurationProv
             oakSolrConfiguration = new OakSolrConfiguration() {
                 @Override
                 public String getFieldNameFor(Type<?> propertyType) {
+                    if (Type.BINARIES.equals(propertyType) || Type.BINARY.equals(propertyType))
{
+                        // TODO : use Tika / SolrCell here
+                        return propertyType.toString()+"_bin";
+                    }
                     return null;
                 }
 



Mime
View raw message