diff --git a/src/main/java/org/elasticsearch/common/lucene/uid/UidField.java b/src/main/java/org/elasticsearch/common/lucene/uid/UidField.java index 52d231c6023..e26d2190d45 100644 --- a/src/main/java/org/elasticsearch/common/lucene/uid/UidField.java +++ b/src/main/java/org/elasticsearch/common/lucene/uid/UidField.java @@ -30,6 +30,7 @@ import org.apache.lucene.search.DocIdSetIterator; import org.apache.lucene.util.BytesRef; import org.elasticsearch.common.Numbers; import org.elasticsearch.common.lucene.Lucene; +import org.elasticsearch.index.mapper.internal.UidFieldMapper; import java.io.IOException; import java.io.Reader; @@ -119,10 +120,9 @@ public class UidField extends Field { private final UidPayloadTokenStream tokenStream; public UidField(String name, String uid, long version) { - super(name, uid, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.NO); + super(name, uid, UidFieldMapper.Defaults.UID_FIELD_TYPE); this.uid = uid; this.version = version; -// this.indexOptions = FieldInfo.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS; this.tokenStream = new UidPayloadTokenStream(this); } diff --git a/src/main/java/org/elasticsearch/index/mapper/internal/UidFieldMapper.java b/src/main/java/org/elasticsearch/index/mapper/internal/UidFieldMapper.java index c821eb51b57..efb5748c931 100644 --- a/src/main/java/org/elasticsearch/index/mapper/internal/UidFieldMapper.java +++ b/src/main/java/org/elasticsearch/index/mapper/internal/UidFieldMapper.java @@ -41,8 +41,6 @@ public class UidFieldMapper extends AbstractFieldMapper implements Internal public static final String NAME = "_uid".intern(); - public static final Term TERM_FACTORY = new Term(NAME, ""); - public static final String CONTENT_TYPE = "_uid"; public static class Defaults extends AbstractFieldMapper.Defaults {