jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1481855 - in /jackrabbit/oak/trunk/oak-lucene: ./ src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/ src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/
Date Mon, 13 May 2013 14:03:48 GMT
Author: alexparvulescu
Date: Mon May 13 14:03:48 2013
New Revision: 1481855

URL: http://svn.apache.org/r1481855
Log:
OAK-817 Expose LuceneIndexHelper via osgi and make it consistent with the property index helpers

Modified:
    jackrabbit/oak/trunk/oak-lucene/pom.xml
    jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/LuceneIndexHelper.java
    jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/LuceneInitializerHelper.java
    jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexTest.java

Modified: jackrabbit/oak/trunk/oak-lucene/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/pom.xml?rev=1481855&r1=1481854&r2=1481855&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-lucene/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-lucene/pom.xml Mon May 13 14:03:48 2013
@@ -45,7 +45,10 @@
         <configuration>
           <instructions>
             <!-- TODO: Should only provide services, not export packages  -->
-            <Export-Package>org.apache.jackrabbit.oak.plugins.index.lucene</Export-Package>
+            <Export-Package>
+              org.apache.jackrabbit.oak.plugins.index.lucene,
+              org.apache.jackrabbit.oak.plugins.index.lucene.util
+            </Export-Package>
             <Embed-Dependency>lucene-*;inline=true</Embed-Dependency>
           </instructions>
         </configuration>

Modified: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/LuceneIndexHelper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/LuceneIndexHelper.java?rev=1481855&r1=1481854&r2=1481855&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/LuceneIndexHelper.java
(original)
+++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/LuceneIndexHelper.java
Mon May 13 14:03:48 2013
@@ -18,7 +18,6 @@ package org.apache.jackrabbit.oak.plugin
 
 import static org.apache.jackrabbit.JcrConstants.JCR_PRIMARYTYPE;
 import static org.apache.jackrabbit.oak.api.Type.NAME;
-import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME;
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NODE_TYPE;
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.REINDEX_PROPERTY_NAME;
 import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.TYPE_PROPERTY_NAME;
@@ -45,9 +44,8 @@ public class LuceneIndexHelper {
     }
 
     public static NodeBuilder newLuceneIndexDefinition(
-            @Nonnull NodeBuilder node, @Nonnull String name,
+            @Nonnull NodeBuilder index, @Nonnull String name,
             @Nullable Set<String> propertyTypes) {
-        NodeBuilder index = node.child(INDEX_DEFINITIONS_NAME);
         if (index.hasChildNode(name)) {
             return index.child(name);
         }

Modified: jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/LuceneInitializerHelper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/LuceneInitializerHelper.java?rev=1481855&r1=1481854&r2=1481855&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/LuceneInitializerHelper.java
(original)
+++ jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/util/LuceneInitializerHelper.java
Mon May 13 14:03:48 2013
@@ -44,7 +44,7 @@ public class LuceneInitializerHelper imp
             return state;
         }
         NodeBuilder builder = state.builder();
-        newLuceneIndexDefinition(builder, name, propertyTypes);
+        newLuceneIndexDefinition(builder.child(INDEX_DEFINITIONS_NAME), name, propertyTypes);
         return builder.getNodeState();
     }
 

Modified: jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexTest.java?rev=1481855&r1=1481854&r2=1481855&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexTest.java
(original)
+++ jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexTest.java
Mon May 13 14:03:48 2013
@@ -21,6 +21,7 @@ import static junit.framework.Assert.ass
 import static junit.framework.Assert.assertTrue;
 import static org.apache.jackrabbit.JcrConstants.JCR_SYSTEM;
 import static org.apache.jackrabbit.JcrConstants.NT_BASE;
+import static org.apache.jackrabbit.oak.plugins.index.IndexConstants.INDEX_DEFINITIONS_NAME;
 import static org.apache.jackrabbit.oak.plugins.index.lucene.util.LuceneIndexHelper.newLuceneIndexDefinition;
 import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE;
 import static org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants.JCR_NODE_TYPES;
@@ -49,7 +50,8 @@ public class LuceneIndexTest {
 
     @Test
     public void testLucene() throws Exception {
-        newLuceneIndexDefinition(builder, "lucene", null);
+        NodeBuilder index = builder.child(INDEX_DEFINITIONS_NAME);
+        newLuceneIndexDefinition(index, "lucene", null);
 
         NodeState before = builder.getNodeState();
         builder.setProperty("foo", "bar");
@@ -71,7 +73,8 @@ public class LuceneIndexTest {
 
     @Test
     public void testLucene2() throws Exception {
-        newLuceneIndexDefinition(builder, "lucene", null);
+        NodeBuilder index = builder.child(INDEX_DEFINITIONS_NAME);
+        newLuceneIndexDefinition(index, "lucene", null);
 
         NodeState before = builder.getNodeState();
         builder.setProperty("foo", "bar");
@@ -101,7 +104,8 @@ public class LuceneIndexTest {
 
     @Test
     public void testLucene3() throws Exception {
-        newLuceneIndexDefinition(builder, "lucene", ImmutableSet.of(Type.STRING.toString()));
+        NodeBuilder index = builder.child(INDEX_DEFINITIONS_NAME);
+        newLuceneIndexDefinition(index, "lucene", ImmutableSet.of(Type.STRING.toString()));
 
         NodeState before = builder.getNodeState();
         builder.setProperty("foo", "bar");



Mime
View raw message