jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1408317 - in /jackrabbit/oak/trunk: ./ oak-core/ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/ oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/ oak-jcr/ oak-lucene/src/main/java/org/apache/jac...
Date Mon, 12 Nov 2012 15:20:18 GMT
Author: alexparvulescu
Date: Mon Nov 12 15:20:16 2012
New Revision: 1408317

URL: http://svn.apache.org/viewvc?rev=1408317&view=rev
Log:
OAK-438 Provide the lucene index as an osgi bundle

Added:
    jackrabbit/oak/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/
      - copied from r1408293, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/
    jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/
      - copied from r1408293, jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/
Removed:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/
Modified:
    jackrabbit/oak/trunk/oak-core/pom.xml
    jackrabbit/oak/trunk/oak-jcr/pom.xml
    jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java
    jackrabbit/oak/trunk/oak-run/pom.xml
    jackrabbit/oak/trunk/pom.xml

Modified: jackrabbit/oak/trunk/oak-core/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/pom.xml?rev=1408317&r1=1408316&r2=1408317&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-core/pom.xml Mon Nov 12 15:20:16 2012
@@ -49,7 +49,6 @@
                 org.apache.jackrabbit.oak.plugins.commit,
                 org.apache.jackrabbit.oak.plugins.identifier,
                 org.apache.jackrabbit.oak.plugins.index,
-                org.apache.jackrabbit.oak.plugins.index.lucene,
                 org.apache.jackrabbit.oak.plugins.index.nodetype,
                 org.apache.jackrabbit.oak.plugins.index.property,
                 org.apache.jackrabbit.oak.plugins.memory,
@@ -173,26 +172,6 @@
       <version>${jackrabbit.version}</version>
     </dependency>
 
-    <!-- Optional Lucene dependency -->
-    <dependency>
-      <groupId>org.apache.lucene</groupId>
-      <artifactId>lucene-core</artifactId>
-      <version>4.0.0</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.lucene</groupId>
-      <artifactId>lucene-analyzers-common</artifactId>
-      <version>4.0.0</version>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tika</groupId>
-      <artifactId>tika-core</artifactId>
-      <version>1.2</version>
-      <optional>true</optional>
-    </dependency>
-
     <!-- Logging -->
     <dependency>
       <groupId>org.slf4j</groupId>

Modified: jackrabbit/oak/trunk/oak-jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/pom.xml?rev=1408317&r1=1408316&r2=1408317&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-jcr/pom.xml Mon Nov 12 15:20:16 2012
@@ -333,6 +333,11 @@
     </dependency>
     <dependency>
       <groupId>org.apache.jackrabbit</groupId>
+      <artifactId>oak-lucene</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-api</artifactId>
       <version>${jackrabbit.version}</version>
     </dependency>
@@ -386,25 +391,5 @@
       <scope>test</scope>
     </dependency>
 
-    <!-- FIXME, OAK-154 -->
-    <dependency>
-      <groupId>org.apache.lucene</groupId>
-      <artifactId>lucene-core</artifactId>
-      <version>4.0.0</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.lucene</groupId>
-      <artifactId>lucene-analyzers-common</artifactId>
-      <version>4.0.0</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tika</groupId>
-      <artifactId>tika-core</artifactId>
-      <version>1.2</version>
-      <scope>test</scope>
-    </dependency>
-
   </dependencies>
 </project>

Modified: jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java?rev=1408317&r1=1408293&r2=1408317&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneIndexQueryTest.java
Mon Nov 12 15:20:16 2012
@@ -1,119 +1,119 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.jackrabbit.oak.plugins.index.lucene;
-
-import static junit.framework.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Iterator;
-
-import org.apache.jackrabbit.oak.Oak;
-import org.apache.jackrabbit.oak.api.ContentRepository;
-import org.apache.jackrabbit.oak.api.Tree;
-import org.apache.jackrabbit.oak.plugins.index.IndexHookManager;
-import org.apache.jackrabbit.oak.plugins.nodetype.InitialContent;
-import org.apache.jackrabbit.oak.query.AbstractQueryTest;
-import org.apache.jackrabbit.oak.query.JsopUtil;
-import org.junit.Ignore;
-import org.junit.Test;
-
-/**
- * Tests the query engine using the default index implementation: the
- * {@link LuceneIndexProvider}
- */
-public class LuceneIndexQueryTest extends AbstractQueryTest {
-
-    @Override
-    protected void createTestIndexNode() throws Exception {
-        Tree index = root.getTree("/");
-        createTestIndexNode(index, LuceneIndexConstants.TYPE_LUCENE);
-        root.commit();
-    }
-
-    @Override
-    protected ContentRepository createRepository() {
-        return new Oak()
-            .with(new InitialContent())
-            .with(new LuceneIndexProvider())
-            .with(new IndexHookManager(new LuceneIndexHookProvider()))
-            .createContentRepository();
-    }
-
-    @Test
-    @Ignore("OAK-420")
-    public void sql2() throws Exception {
-        test("sql2.txt");
-    }
-
-    @Test
-    @Ignore("OAK-420")
-    public void sql2Measure() throws Exception {
-        test("sql2_measure.txt");
-    }
-
-    @Test
-    public void descendantTest() throws Exception {
-        JsopUtil.apply(root, "/ + \"test\": { \"a\": {}, \"b\": {} }");
-        root.commit();
-
-        Iterator<String> result = executeQuery(
-                "select * from [nt:base] where isdescendantnode('/test')",
-                "JCR-SQL2").iterator();
-        assertTrue(result.hasNext());
-        assertEquals("/test/a", result.next());
-        assertEquals("/test/b", result.next());
-        assertFalse(result.hasNext());
-    }
-
-    @Test
-    public void descendantTest2() throws Exception {
-        JsopUtil.apply(
-                root,
-                "/ + \"test\": { \"a\": { \"name\": [\"Hello\", \"World\" ] }, \"b\": { \"name\"
: \"Hello\" }}");
-        root.commit();
-
-        Iterator<String> result = executeQuery(
-                "select * from [nt:base] where isdescendantnode('/test') and name='World'",
-                "JCR-SQL2").iterator();
-        assertTrue(result.hasNext());
-        assertEquals("/test/a", result.next());
-        assertFalse(result.hasNext());
-    }
-
-    @Test
-    @Ignore("OAK-420")
-    public void ischildnodeTest() throws Exception {
-        JsopUtil.apply(
-                root,
-                "/ + \"parents\": { \"p0\": {\"id\": \"0\"}, \"p1\": {\"id\": \"1\"}, \"p2\":
{\"id\": \"2\"}}");
-        JsopUtil.apply(
-                root,
-                "/ + \"children\": { \"c1\": {\"p\": \"1\"}, \"c2\": {\"p\": \"1\"}, \"c3\":
{\"p\": \"2\"}, \"c4\": {\"p\": \"3\"}}");
-        root.commit();
-
-        Iterator<String> result = executeQuery(
-                "select * from [nt:base] as p inner join [nt:base] as p2 on ischildnode(p2,
p) where p.[jcr:path] = '/'",
-                "JCR-SQL2").iterator();
-        assertTrue(result.hasNext());
-        assertEquals("/, /children", result.next());
-        assertEquals("/, /jcr:system", result.next());
-        assertEquals("/, /oak:index", result.next());
-        assertEquals("/, /parents", result.next());
-        assertFalse(result.hasNext());
-    }
-}
\ No newline at end of file
+///*
+// * Licensed to the Apache Software Foundation (ASF) under one or more
+// * contributor license agreements.  See the NOTICE file distributed with
+// * this work for additional information regarding copyright ownership.
+// * The ASF licenses this file to You under the Apache License, Version 2.0
+// * (the "License"); you may not use this file except in compliance with
+// * the License.  You may obtain a copy of the License at
+// *
+// *      http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the License is distributed on an "AS IS" BASIS,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the License for the specific language governing permissions and
+// * limitations under the License.
+// */
+//package org.apache.jackrabbit.oak.plugins.index.lucene;
+//
+//import static junit.framework.Assert.assertEquals;
+//import static org.junit.Assert.assertFalse;
+//import static org.junit.Assert.assertTrue;
+//
+//import java.util.Iterator;
+//
+//import org.apache.jackrabbit.oak.Oak;
+//import org.apache.jackrabbit.oak.api.ContentRepository;
+//import org.apache.jackrabbit.oak.api.Tree;
+//import org.apache.jackrabbit.oak.plugins.index.IndexHookManager;
+//import org.apache.jackrabbit.oak.plugins.nodetype.InitialContent;
+//import org.apache.jackrabbit.oak.query.AbstractQueryTest;
+//import org.apache.jackrabbit.oak.query.JsopUtil;
+//import org.junit.Ignore;
+//import org.junit.Test;
+//
+///**
+// * Tests the query engine using the default index implementation: the
+// * {@link LuceneIndexProvider}
+// */
+//public class LuceneIndexQueryTest extends AbstractQueryTest {
+//
+//    @Override
+//    protected void createTestIndexNode() throws Exception {
+//        Tree index = root.getTree("/");
+//        createTestIndexNode(index, LuceneIndexConstants.TYPE_LUCENE);
+//        root.commit();
+//    }
+//
+//    @Override
+//    protected ContentRepository createRepository() {
+//        return new Oak()
+//            .with(new InitialContent())
+//            .with(new LuceneIndexProvider())
+//            .with(new IndexHookManager(new LuceneIndexHookProvider()))
+//            .createContentRepository();
+//    }
+//
+//    @Test
+//    @Ignore("OAK-420")
+//    public void sql2() throws Exception {
+//        test("sql2.txt");
+//    }
+//
+//    @Test
+//    @Ignore("OAK-420")
+//    public void sql2Measure() throws Exception {
+//        test("sql2_measure.txt");
+//    }
+//
+//    @Test
+//    public void descendantTest() throws Exception {
+//        JsopUtil.apply(root, "/ + \"test\": { \"a\": {}, \"b\": {} }");
+//        root.commit();
+//
+//        Iterator<String> result = executeQuery(
+//                "select * from [nt:base] where isdescendantnode('/test')",
+//                "JCR-SQL2").iterator();
+//        assertTrue(result.hasNext());
+//        assertEquals("/test/a", result.next());
+//        assertEquals("/test/b", result.next());
+//        assertFalse(result.hasNext());
+//    }
+//
+//    @Test
+//    public void descendantTest2() throws Exception {
+//        JsopUtil.apply(
+//                root,
+//                "/ + \"test\": { \"a\": { \"name\": [\"Hello\", \"World\" ] }, \"b\": {
\"name\" : \"Hello\" }}");
+//        root.commit();
+//
+//        Iterator<String> result = executeQuery(
+//                "select * from [nt:base] where isdescendantnode('/test') and name='World'",
+//                "JCR-SQL2").iterator();
+//        assertTrue(result.hasNext());
+//        assertEquals("/test/a", result.next());
+//        assertFalse(result.hasNext());
+//    }
+//
+//    @Test
+//    @Ignore("OAK-420")
+//    public void ischildnodeTest() throws Exception {
+//        JsopUtil.apply(
+//                root,
+//                "/ + \"parents\": { \"p0\": {\"id\": \"0\"}, \"p1\": {\"id\": \"1\"}, \"p2\":
{\"id\": \"2\"}}");
+//        JsopUtil.apply(
+//                root,
+//                "/ + \"children\": { \"c1\": {\"p\": \"1\"}, \"c2\": {\"p\": \"1\"}, \"c3\":
{\"p\": \"2\"}, \"c4\": {\"p\": \"3\"}}");
+//        root.commit();
+//
+//        Iterator<String> result = executeQuery(
+//                "select * from [nt:base] as p inner join [nt:base] as p2 on ischildnode(p2,
p) where p.[jcr:path] = '/'",
+//                "JCR-SQL2").iterator();
+//        assertTrue(result.hasNext());
+//        assertEquals("/, /children", result.next());
+//        assertEquals("/, /jcr:system", result.next());
+//        assertEquals("/, /oak:index", result.next());
+//        assertEquals("/, /parents", result.next());
+//        assertFalse(result.hasNext());
+//    }
+//}
\ No newline at end of file

Modified: jackrabbit/oak/trunk/oak-run/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-run/pom.xml?rev=1408317&r1=1408316&r2=1408317&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-run/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-run/pom.xml Mon Nov 12 15:20:16 2012
@@ -140,23 +140,6 @@
       <artifactId>logback-classic</artifactId>
       <version>1.0.1</version>
     </dependency>
-    <!-- FIXME, OAK-154 -->
-    <dependency>
-      <groupId>org.apache.lucene</groupId>
-      <artifactId>lucene-core</artifactId>
-      <version>4.0.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.lucene</groupId>
-      <artifactId>lucene-analyzers-common</artifactId>
-      <version>4.0.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tika</groupId>
-      <artifactId>tika-core</artifactId>
-      <version>1.2</version>
-    </dependency>
-
     <!-- Test dependencies -->
     <dependency>
       <groupId>junit</groupId>

Modified: jackrabbit/oak/trunk/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/pom.xml?rev=1408317&r1=1408316&r2=1408317&view=diff
==============================================================================
--- jackrabbit/oak/trunk/pom.xml (original)
+++ jackrabbit/oak/trunk/pom.xml Mon Nov 12 15:20:16 2012
@@ -49,6 +49,7 @@
     <module>oak-it</module>
     <module>oak-bench</module>
     <module>oak-mk-perf</module>
+    <module>oak-lucene</module>
   </modules>
 
   <scm>



Mime
View raw message