diff --git a/README.md b/README.md index 1f2dcab7272..b4095457370 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ In order to install the plugin, simply run: `bin/plugin -install elasticsearch/e ------------------------------------------------------ | Attachment Mapper Plugin | ElasticSearch | Tika | ------------------------------------------------------ - | master | 0.90 -> master | 1.2 | + | master | 0.90.3 -> master | 1.2 | ------------------------------------------------------ - | 1.7.0 | 0.90 -> master | 1.2 | + | 1.7.0 | 0.90 -> 0.90.2 | 1.2 | ------------------------------------------------------ | 1.6.0 | 0.19 -> 0.20 | 1.2 | ------------------------------------------------------ diff --git a/pom.xml b/pom.xml index bd68598cf4f..a06ef6a5ec2 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ - 0.90.0.Beta1 + 0.90.3 diff --git a/src/main/java/org/elasticsearch/index/mapper/attachment/AttachmentMapper.java b/src/main/java/org/elasticsearch/index/mapper/attachment/AttachmentMapper.java index 8d9a7cac468..b0e5169a0fc 100644 --- a/src/main/java/org/elasticsearch/index/mapper/attachment/AttachmentMapper.java +++ b/src/main/java/org/elasticsearch/index/mapper/attachment/AttachmentMapper.java @@ -21,7 +21,7 @@ package org.elasticsearch.index.mapper.attachment; import org.apache.tika.exception.TikaException; import org.apache.tika.metadata.Metadata; -import org.elasticsearch.common.io.FastByteArrayInputStream; +import org.elasticsearch.common.io.stream.BytesStreamInput; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.mapper.*; @@ -311,7 +311,7 @@ public class AttachmentMapper implements Mapper { String parsedContent; try { // Set the maximum length of strings returned by the parseToString method, -1 sets no limit - parsedContent = tika().parseToString(new FastByteArrayInputStream(content), metadata, indexedChars); + parsedContent = tika().parseToString(new BytesStreamInput(content, false), metadata, indexedChars); } catch (TikaException e) { throw new MapperParsingException("Failed to extract [" + indexedChars + "] characters of text for [" + name + "]", e); }