camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmuel...@apache.org
Subject git commit: CAMEL-6612: upgrade camel-elasticsearch to 0.90.3 version. Thanks Marios Trivizas for the patch
Date Mon, 30 Sep 2013 20:08:44 GMT
Updated Branches:
  refs/heads/master 281268e9e -> f187868e3


CAMEL-6612: upgrade camel-elasticsearch to 0.90.3 version. Thanks Marios Trivizas for the
patch


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f187868e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f187868e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f187868e

Branch: refs/heads/master
Commit: f187868e3a1d7cd2e6f48dfc92c82915c2400e36
Parents: 281268e
Author: cmueller <cmueller@apache.org>
Authored: Mon Sep 30 22:06:57 2013 +0200
Committer: cmueller <cmueller@apache.org>
Committed: Mon Sep 30 22:06:57 2013 +0200

----------------------------------------------------------------------
 components/camel-lucene/pom.xml                         | 10 ++++++++++
 .../apache/camel/component/lucene/LuceneSearcher.java   | 12 +++++++-----
 .../lucene/LuceneIndexAndQueryProducerTest.java         |  4 ++--
 .../processor/lucene/LuceneQueryProcessorTest.java      |  4 ++--
 parent/pom.xml                                          |  8 ++++----
 .../features/src/main/resources/bundles.properties      |  4 ++++
 .../karaf/features/src/main/resources/features.xml      |  9 +++++++++
 7 files changed, 38 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f187868e/components/camel-lucene/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-lucene/pom.xml b/components/camel-lucene/pom.xml
index 5ec555c..ddc9ad3 100644
--- a/components/camel-lucene/pom.xml
+++ b/components/camel-lucene/pom.xml
@@ -53,6 +53,16 @@
 			<artifactId>lucene-core</artifactId>
 			<version>${lucene-version}</version>
 		</dependency>
+		<dependency>
+			<groupId>org.apache.lucene</groupId>
+			<artifactId>lucene-queryparser</artifactId>
+			<version>${lucene-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.lucene</groupId>
+			<artifactId>lucene-analyzers-common</artifactId>
+			<version>${lucene-version}</version>
+		</dependency>
 
 		<!-- test dependencies -->
 		<dependency>

http://git-wip-us.apache.org/repos/asf/camel/blob/f187868e/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java
----------------------------------------------------------------------
diff --git a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java
b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java
index d6b938a..bd3026f 100644
--- a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java
+++ b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java
@@ -24,8 +24,8 @@ import org.apache.camel.processor.lucene.support.Hits;
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.queryParser.ParseException;
-import org.apache.lucene.queryParser.QueryParser;
+import org.apache.lucene.queryparser.classic.ParseException;
+import org.apache.lucene.queryparser.classic.QueryParser;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.ScoreDoc;
@@ -39,19 +39,21 @@ public class LuceneSearcher {
     private static final Logger LOG = LoggerFactory.getLogger(LuceneSearcher.class);
     private Analyzer analyzer;
     private IndexSearcher indexSearcher; 
+    private IndexReader indexReader;
     private ScoreDoc[] hits;
 
     public void open(File indexDirectory, Analyzer analyzer) throws IOException {
         if (indexDirectory != null) {
-            indexSearcher = new IndexSearcher(IndexReader.open(new NIOFSDirectory(indexDirectory)));
+            indexReader = IndexReader.open(new NIOFSDirectory(indexDirectory));
         } else {
-            indexSearcher = new IndexSearcher(IndexReader.open(new NIOFSDirectory(new File("./indexDirectory"))));
+            indexReader = IndexReader.open(new NIOFSDirectory(new File("./indexDirectory")));
         }
+        indexSearcher = new IndexSearcher(indexReader);
         this.analyzer = analyzer;
     }
 
     public void close() throws IOException {
-        indexSearcher.close();        
+        indexReader.close();        
     }
     
     public Hits search(String searchPhrase, int maxNumberOfHits) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/f187868e/components/camel-lucene/src/test/java/org/apache/camel/component/lucene/LuceneIndexAndQueryProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-lucene/src/test/java/org/apache/camel/component/lucene/LuceneIndexAndQueryProducerTest.java
b/components/camel-lucene/src/test/java/org/apache/camel/component/lucene/LuceneIndexAndQueryProducerTest.java
index a4b1af5..929f324 100644
--- a/components/camel-lucene/src/test/java/org/apache/camel/component/lucene/LuceneIndexAndQueryProducerTest.java
+++ b/components/camel-lucene/src/test/java/org/apache/camel/component/lucene/LuceneIndexAndQueryProducerTest.java
@@ -27,8 +27,8 @@ import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.processor.lucene.support.Hits;
 import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.lucene.analysis.SimpleAnalyzer;
-import org.apache.lucene.analysis.WhitespaceAnalyzer;
+import org.apache.lucene.analysis.core.SimpleAnalyzer;
+import org.apache.lucene.analysis.core.WhitespaceAnalyzer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.apache.lucene.util.Version;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/camel/blob/f187868e/components/camel-lucene/src/test/java/org/apache/camel/processor/lucene/LuceneQueryProcessorTest.java
----------------------------------------------------------------------
diff --git a/components/camel-lucene/src/test/java/org/apache/camel/processor/lucene/LuceneQueryProcessorTest.java
b/components/camel-lucene/src/test/java/org/apache/camel/processor/lucene/LuceneQueryProcessorTest.java
index 8a4d59c..78b8fe6 100644
--- a/components/camel-lucene/src/test/java/org/apache/camel/processor/lucene/LuceneQueryProcessorTest.java
+++ b/components/camel-lucene/src/test/java/org/apache/camel/processor/lucene/LuceneQueryProcessorTest.java
@@ -24,7 +24,7 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.processor.lucene.support.Hits;
 import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.lucene.analysis.SimpleAnalyzer;
+import org.apache.lucene.analysis.core.WhitespaceAnalyzer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.apache.lucene.util.Version;
 import org.junit.Test;
@@ -97,7 +97,7 @@ public class LuceneQueryProcessorTest extends CamelTestSupport {
     
     @Test
     public void testWildcardSearcher() throws Exception {
-        final SimpleAnalyzer analyzer = new SimpleAnalyzer(Version.LUCENE_36);
+        final WhitespaceAnalyzer analyzer = new WhitespaceAnalyzer(Version.LUCENE_36);
         MockEndpoint mockSearchEndpoint = getMockEndpoint("mock:searchResult");
         
         context.stop();

http://git-wip-us.apache.org/repos/asf/camel/blob/f187868e/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index a2b5bc8..8d34536 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -119,8 +119,8 @@
     <eclipse-equinox-common-version>3.3.0-v20070426</eclipse-equinox-common-version>
     <ehcache-version>2.7.2</ehcache-version>
     <!-- The 0.20 bundle is flawed, see SMX4-1372 -->
-    <elasticsearch-bundle-version>0.19.10_1</elasticsearch-bundle-version>
-    <elasticsearch-version>0.20.6</elasticsearch-version>
+    <elasticsearch-bundle-version>0.90.3_1</elasticsearch-bundle-version>
+    <elasticsearch-version>0.90.3</elasticsearch-version>
     <el-api-1.0-version>1.0.1</el-api-1.0-version>
     <exec-maven-plugin-version>1.2.1</exec-maven-plugin-version>
     <ezmorph-bundle-version>1.0.6_1</ezmorph-bundle-version>
@@ -250,8 +250,8 @@
     <leveldbjni-version>1.7</leveldbjni-version>
     <log4j-version>1.2.17</log4j-version>
     <!-- we await upgrade for lucene 4.x to sync -->
-    <lucene-bundle-version>3.6.0_1</lucene-bundle-version>
-    <lucene-version>3.6.1</lucene-version>
+    <lucene-bundle-version>4.4.0_1</lucene-bundle-version>
+    <lucene-version>4.4.0</lucene-version>
     <lightcouch-version>0.0.6</lightcouch-version>
     <lightcouch-bundle-version>0.0.5_1</lightcouch-bundle-version>
     <!-- needed from tooling/archetypes -->

http://git-wip-us.apache.org/repos/asf/camel/blob/f187868e/platforms/karaf/features/src/main/resources/bundles.properties
----------------------------------------------------------------------
diff --git a/platforms/karaf/features/src/main/resources/bundles.properties b/platforms/karaf/features/src/main/resources/bundles.properties
index 6129bf9..11e26b8 100644
--- a/platforms/karaf/features/src/main/resources/bundles.properties
+++ b/platforms/karaf/features/src/main/resources/bundles.properties
@@ -58,6 +58,10 @@ org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch/${jsch-bundle-v
 org.apache.servicemix.bundles/org.apache.servicemix.bundles.juel/${juel-bundle-version}/jar
 org.apache.servicemix.bundles/org.apache.servicemix.bundles.junit/${junit-bundle-version}/jar
 org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene/${lucene-bundle-version}/jar
+org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene-analyzers-common/${lucene-bundle-version}/jar
+org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene-queryparser/${lucene-bundle-version}/jar
+org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene-queries/${lucene-bundle-version}/jar
+org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene-sandbox/${lucene-bundle-version}/jar
 org.apache.servicemix.bundles/org.apache.servicemix.bundles.ognl/${ognl-bundle-version}/jar
 org.apache.servicemix.bundles/org.apache.servicemix.bundles.oscache/${oscache-bundle-version}/jar
 org.apache.servicemix.bundles/org.apache.servicemix.bundles.httpcore/${httpcore-bundle-version}/jar

http://git-wip-us.apache.org/repos/asf/camel/blob/f187868e/platforms/karaf/features/src/main/resources/features.xml
----------------------------------------------------------------------
diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml
index 9a1a388..b1bb554 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -255,6 +255,10 @@
     <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jakarta-regexp/${regexp-bundle-version}</bundle>
     <bundle dependency='true'>mvn:org.mvel/mvel2/${mvel-version}</bundle>
     <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene/${lucene-bundle-version}</bundle>
+    <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene-analyzers-common/${lucene-bundle-version}</bundle>
+    <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene-queryparser/${lucene-bundle-version}</bundle>
+    <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene-queries/${lucene-bundle-version}</bundle>
+    <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene-sandbox/${lucene-bundle-version}</bundle>
     <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch/${elasticsearch-bundle-version}</bundle>
     <bundle>mvn:org.apache.camel/camel-elasticsearch/${project.version}</bundle>
   </feature>
@@ -626,6 +630,11 @@
   <feature name='camel-lucene' version='${project.version}' resolver='(obr)' start-level='50'>
     <feature version='${project.version}'>camel-core</feature>
     <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene/${lucene-bundle-version}</bundle>
+    <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene-analyzers-common/${lucene-bundle-version}</bundle>
+    <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene-queryparser/${lucene-bundle-version}</bundle>
+    <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene-queries/${lucene-bundle-version}</bundle>
+    <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene-sandbox/${lucene-bundle-version}</bundle>
+    <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jakarta-regexp/${regexp-bundle-version}</bundle>
     <bundle>mvn:org.apache.camel/camel-lucene/${project.version}</bundle>
   </feature>
   <feature name='camel-mail' version='${project.version}' resolver='(obr)' start-level='50'>


Mime
View raw message