# Deprecated API

## Contents

- Deprecated Classes
- Deprecated Enums
- Deprecated Fields
- Deprecated Methods
- Deprecated Constructors
- Deprecated Enum Constants

Deprecated Classes
Class and Description
org.apache.lucene.document.ByteDocValuesField use `NumericDocValuesField` instead.
org.apache.lucene.document.DerefBytesDocValuesField Use `BinaryDocValuesField` instead.
org.apache.lucene.util.IndexableBinaryStringTools Implement `TermToBytesRefAttribute` and store bytes directly instead. This class will be removed in Lucene 5.0
org.apache.lucene.document.IntDocValuesField use `NumericDocValuesField` instead.
org.apache.lucene.document.LongDocValuesField use `NumericDocValuesField` instead.
org.apache.lucene.codecs.lucene3x.Lucene3xCodec Only for reading existing 3.x indexes
org.apache.lucene.codecs.lucene3x.Lucene3xSegmentInfoFormat (4.0) This is only used to read indexes created before 4.0.
org.apache.lucene.codecs.lucene3x.Lucene3xSegmentInfoReader Only for reading existing 3.x indexes
org.apache.lucene.codecs.lucene40.Lucene40Codec Only for reading old 4.0 segments
org.apache.lucene.codecs.lucene40.Lucene40DocValuesFormat Only for reading old 4.0 and 4.1 segments
org.apache.lucene.codecs.lucene40.Lucene40FieldInfosFormat Only for reading old 4.0 and 4.1 segments
org.apache.lucene.codecs.lucene40.Lucene40NormsFormat Only for reading old 4.0 and 4.1 segments
org.apache.lucene.codecs.lucene40.Lucene40PostingsBaseFormat Only for reading old 4.0 segments
org.apache.lucene.codecs.lucene40.Lucene40PostingsFormat Only for reading old 4.0 segments
org.apache.lucene.codecs.lucene40.Lucene40PostingsReader Only for reading old 4.0 segments
org.apache.lucene.codecs.lucene40.Lucene40SkipListReader Only for reading old 4.0 segments
org.apache.lucene.codecs.lucene41.Lucene41Codec Only for reading old 4.0 segments
org.apache.lucene.document.PackedLongDocValuesField use `NumericDocValuesField` instead.
org.apache.lucene.document.ShortDocValuesField use `NumericDocValuesField` instead.
org.apache.lucene.document.SortedBytesDocValuesField Use `SortedDocValuesField` instead.
org.apache.lucene.document.StraightBytesDocValuesField Use `BinaryDocValuesField` instead.

Deprecated Enums
Enum and Description
org.apache.lucene.document.Field.Index This is here only to ease transition from the pre-4.0 APIs.
org.apache.lucene.document.Field.TermVector This is here only to ease transition from the pre-4.0 APIs.

Deprecated Fields
Field and Description
org.apache.lucene.search.FuzzyQuery.defaultMinSimilarity pass integer edit distances instead.
org.apache.lucene.util.Constants.JRE_IS_MINIMUM_JAVA6 With Lucene 4.0, we are always on Java 6

Deprecated Methods
Method and Description
org.apache.lucene.search.IndexSearcher.document(int, Set<String>) Use `IndexSearcher.doc(int, Set)` instead.
org.apache.lucene.search.FuzzyQuery.floatToEdits(float, int) pass integer edit distances instead.
org.apache.lucene.index.Fields.getUniqueTermCount() iterate fields and add their size() instead. this method is only provided as a transition mechanism to access this statistic for 3.x indexes, which do not have this statistic per-field.
org.apache.lucene.util.CharsRef.getUTF16SortedAsUTF8Comparator() This comparator is only a transition mechanism
org.apache.lucene.util.BytesRef.getUTF8SortedAsUTF16Comparator() This comparator is only a transition mechanism
org.apache.lucene.index.AtomicReader.hasNorms(String) (4.0) use `AtomicReader.getFieldInfos()` and check `FieldInfo.hasNorms()` for the field instead.
org.apache.lucene.index.IndexReader.open(Directory) Use `DirectoryReader.open(Directory)`
org.apache.lucene.index.IndexReader.open(Directory, int) Use `DirectoryReader.open(Directory,int)`
org.apache.lucene.index.IndexReader.open(IndexCommit) Use `DirectoryReader.open(IndexCommit)`
org.apache.lucene.index.IndexReader.open(IndexCommit, int) Use `DirectoryReader.open(IndexCommit,int)`
org.apache.lucene.index.IndexReader.open(IndexWriter, boolean) Use `DirectoryReader.open(IndexWriter,boolean)`
org.apache.lucene.store.Directory.IndexInputSlicer.openFullSlice() Only for reading CFS files from 3.x indexes.
org.apache.lucene.store.IndexOutput.seek(long) (4.1) This method will be removed in Lucene 5.0
org.apache.lucene.document.Field.translateFieldType(Field.Store, Field.Index, Field.TermVector) This is here only to ease transition from the pre-4.0 APIs.
org.apache.lucene.index.SegmentInfos.write3xInfo(Directory, SegmentInfo, IOContext)

Deprecated Constructors
Constructor and Description
org.apache.lucene.document.Field(String, byte[]) Use `StoredField` instead.
org.apache.lucene.document.Field(String, byte[], int, int) Use `StoredField` instead.
org.apache.lucene.document.Field(String, Reader) Use `TextField` instead.
org.apache.lucene.document.Field(String, Reader, Field.TermVector) Use `TextField` instead.
org.apache.lucene.document.Field(String, String, Field.Store, Field.Index) Use `StringField`, `TextField` instead.
org.apache.lucene.document.Field(String, String, Field.Store, Field.Index, Field.TermVector) Use `StringField`, `TextField` instead.
org.apache.lucene.document.Field(String, TokenStream) Use `TextField` instead
org.apache.lucene.document.Field(String, TokenStream, Field.TermVector) Use `TextField` instead

Deprecated Enum Constants
Enum Constant and Description
org.apache.lucene.util.Version.LUCENE_30 (4.0) Use latest
org.apache.lucene.util.Version.LUCENE_31 (4.0) Use latest
org.apache.lucene.util.Version.LUCENE_32 (4.0) Use latest
org.apache.lucene.util.Version.LUCENE_33 (4.0) Use latest
org.apache.lucene.util.Version.LUCENE_34 (4.0) Use latest
org.apache.lucene.util.Version.LUCENE_35 (4.0) Use latest
org.apache.lucene.util.Version.LUCENE_36 (4.0) Use latest
org.apache.lucene.util.Version.LUCENE_40 (4.1) Use latest
org.apache.lucene.util.Version.LUCENE_CURRENT Use an actual version instead.