Permalink
Browse files

update carrot2 to support 0.19.11

  • Loading branch information...
1 parent 5154f0a commit 1dfa57869e7500e4745330a6d8ac15593e5ed6a8 @medcl committed Nov 17, 2012
Showing with 27 additions and 5 deletions.
  1. +2 −1 .gitignore
  2. +22 −3 pom.xml
  3. +3 −1 src/main/java/org/elasticsearch/plugin/infinitbyte/Carrot2RestAction.java
View
@@ -1,4 +1,5 @@
target
*.iml
*.ipr
-*.iws
+*.iws
+.idea
View
25 pom.xml
@@ -5,10 +5,10 @@
<modelVersion>4.0.0</modelVersion>
<groupId>elasticsearch</groupId>
<artifactId>elasticsearch-carrot2</artifactId>
- <version>1.0</version>
+ <version>1.0.1</version>
<properties>
- <elasticsearch.version>0.19.0</elasticsearch.version>
+ <elasticsearch.version>0.19.11</elasticsearch.version>
</properties>
<repositories>
@@ -31,7 +31,7 @@
<dependency>
<groupId>org.carrot2</groupId>
<artifactId>carrot2-core</artifactId>
- <version>3.6.0-SNAPSHOT</version>
+ <version>3.6.0</version>
</dependency>
</dependencies>
@@ -58,6 +58,25 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <outputDirectory>${project.build.directory}/releases/</outputDirectory>
+ <descriptors>
+ <descriptor>${basedir}/src/assemblies/plugin.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
<pluginManagement>
@@ -19,6 +19,7 @@
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.Strings;
+import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentBuilder;
@@ -346,7 +347,8 @@ private Carrot2Request parseSearchRequest(RestRequest request) {
Carrot2Request searchRequest = new Carrot2Request(indices);
// get the content, and put it in the body
if (request.hasContent()) {
- searchRequest.source(request.contentByteArray(), request.contentByteArrayOffset(), request.contentLength(), request.contentUnsafe());
+ BytesReference content = request.content();
+ searchRequest.source(content.array(), content.arrayOffset(), content.length(), request.contentUnsafe());
} else {
String source = request.param("source");
if (source != null) {

0 comments on commit 1dfa578

Please sign in to comment.