Plugin must be 0.20.x compatible (tests fails)
This commit is contained in:
parent
17ae816a6a
commit
30e425e209
2
pom.xml
2
pom.xml
|
@ -30,7 +30,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<elasticsearch.version>0.19.0</elasticsearch.version>
|
<elasticsearch.version>0.20.1</elasticsearch.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
package org.elasticsearch.index.mapper.xcontent;
|
package org.elasticsearch.index.mapper.xcontent;
|
||||||
|
|
||||||
import org.apache.lucene.document.Document;
|
import org.apache.lucene.document.Document;
|
||||||
|
import org.elasticsearch.common.bytes.BytesReference;
|
||||||
import org.elasticsearch.index.Index;
|
import org.elasticsearch.index.Index;
|
||||||
import org.elasticsearch.index.analysis.AnalysisService;
|
import org.elasticsearch.index.analysis.AnalysisService;
|
||||||
import org.elasticsearch.index.mapper.DocumentMapper;
|
import org.elasticsearch.index.mapper.DocumentMapper;
|
||||||
|
@ -55,7 +56,7 @@ public class SimpleAttachmentMapperTests {
|
||||||
DocumentMapper docMapper = mapperParser.parse(mapping);
|
DocumentMapper docMapper = mapperParser.parse(mapping);
|
||||||
byte[] html = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/xcontent/testXHTML.html");
|
byte[] html = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/xcontent/testXHTML.html");
|
||||||
|
|
||||||
byte[] json = jsonBuilder().startObject().field("_id", 1).field("file", html).endObject().copiedBytes();
|
BytesReference json = jsonBuilder().startObject().field("_id", 1).field("file", html).endObject().bytes();
|
||||||
|
|
||||||
Document doc = docMapper.parse(json).rootDoc();
|
Document doc = docMapper.parse(json).rootDoc();
|
||||||
|
|
||||||
|
@ -67,7 +68,7 @@ public class SimpleAttachmentMapperTests {
|
||||||
String builtMapping = docMapper.mappingSource().string();
|
String builtMapping = docMapper.mappingSource().string();
|
||||||
docMapper = mapperParser.parse(builtMapping);
|
docMapper = mapperParser.parse(builtMapping);
|
||||||
|
|
||||||
json = jsonBuilder().startObject().field("_id", 1).field("file", html).endObject().copiedBytes();
|
json = jsonBuilder().startObject().field("_id", 1).field("file", html).endObject().bytes();
|
||||||
|
|
||||||
doc = docMapper.parse(json).rootDoc();
|
doc = docMapper.parse(json).rootDoc();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue