Mapper 1.7.0 does not work with elasticsearch 0.90.3
FastByteArrayInputStream has been removed in 0.90.3. Closes #34.
This commit is contained in:
parent
690779cf2f
commit
d054f9a1e7
|
@ -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 |
|
||||
------------------------------------------------------
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -30,7 +30,7 @@
|
|||
</parent>
|
||||
|
||||
<properties>
|
||||
<elasticsearch.version>0.90.0.Beta1</elasticsearch.version>
|
||||
<elasticsearch.version>0.90.3</elasticsearch.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue