lucene 4: use field type in UidField
This commit is contained in:
parent
faf3e0e857
commit
dca88a9b7c
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,8 +41,6 @@ public class UidFieldMapper extends AbstractFieldMapper<Uid> 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 {
|
||||
|
|
Loading…
Reference in New Issue