]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5061 - Updated pom and code update for ES v.1.1.1
authorStephane Gamard <stephane.gamard@searchbox.com>
Fri, 16 May 2014 08:42:29 +0000 (10:42 +0200)
committerStephane Gamard <stephane.gamard@searchbox.com>
Mon, 19 May 2014 05:44:52 +0000 (07:44 +0200)
pom.xml
sonar-server/src/main/java/org/sonar/server/es/ESIndex.java
sonar-server/src/main/java/org/sonar/server/rule/RuleRegistry.java

diff --git a/pom.xml b/pom.xml
index 9e353f964135b5437a5c7264213d52cb86cb90d2..b8b20937906c08563a25d9318ab0d2b455be0bb3 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -76,7 +76,7 @@
     <logback.version>1.0.13</logback.version>
     <slf4j.version>1.7.5</slf4j.version>
     <tomcat.version>7.0.42</tomcat.version>
-    <elasticsearch.version>0.90.9</elasticsearch.version>
+    <elasticsearch.version>1.1.1</elasticsearch.version>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <maven.min.version>3.0.5</maven.min.version>
     <maven.api.version>2.2.0</maven.api.version>
index 41e510dbd248fa3063acb00a6aed47551c12826c..da51fbe5393d40f8b2e24ae8526ca1e7da6e8403 100644 (file)
@@ -21,7 +21,6 @@ package org.sonar.server.es;
 
 import com.google.common.collect.Lists;
 import org.apache.commons.io.IOUtils;
-import org.elasticsearch.ElasticSearchParseException;
 import org.elasticsearch.action.bulk.BulkItemResponse;
 import org.elasticsearch.action.bulk.BulkRequestBuilder;
 import org.elasticsearch.action.bulk.BulkResponse;
@@ -170,13 +169,10 @@ public class ESIndex implements Startable {
     }
 
     watch = createWatch();
-    try {
       indices.putMapping(Requests.putMappingRequest(index).type(type).source(mapping)).actionGet();
-    } catch (ElasticSearchParseException parseException) {
-      throw new IllegalArgumentException("Invalid mapping file", parseException);
-    } finally {
+
       watch.stop("put mapping on index '%s' for type '%s'", index, type);
-    }
+
   }
 
   public List<String> findDocumentIds(SearchQuery searchQuery) {
index b80114ca3740d9c71043e3e3cea520499976b37c..c5ee7c774b3ca303156139612c57fd66fd1b4b86 100644 (file)
@@ -26,7 +26,6 @@ import com.google.common.collect.ImmutableList.Builder;
 import com.google.common.collect.Multimap;
 import org.apache.commons.lang.StringUtils;
 import org.apache.ibatis.session.SqlSession;
-import org.elasticsearch.ElasticSearchException;
 import org.elasticsearch.action.search.SearchRequestBuilder;
 import org.elasticsearch.action.search.SearchResponse;
 import org.elasticsearch.action.search.SearchType;
@@ -311,15 +310,12 @@ public class RuleRegistry {
       searchQuery.field(param.getKey(), param.getValue().split("\\|"));
     }
 
-    try {
       List<Integer> result = newArrayList();
       for (String docId : searchIndex.findDocumentIds(searchQuery)) {
         result.add(Integer.parseInt(docId));
       }
       return result;
-    } catch (ElasticSearchException searchException) {
-      throw new IllegalArgumentException("Unable to perform search, please check query", searchException);
-    }
+
   }
 
   public PagedResult<Rule> find(RuleQuery query) {