# Deprecated API

## Contents

- Deprecated Classes
- Deprecated Fields
- Deprecated Methods

- Deprecated Classes
  Class and Description
  org.apache.lucene.store.ByteArrayIndexInput Will be removed in future Lucene versions. Use byte buffer backed index inputs instead.
  org.apache.lucene.search.EarlyTerminatingSortingCollector Pass trackTotalHits=false to `TopFieldCollector` instead of using this class.
  org.apache.lucene.index.LegacyBinaryDocValues Use `BinaryDocValues` instead.
  org.apache.lucene.index.LegacyBinaryDocValuesWrapper Implement `BinaryDocValues` directly.
  org.apache.lucene.index.LegacyNumericDocValues Use `NumericDocValues` instead.
  org.apache.lucene.index.LegacyNumericDocValuesWrapper Implement `NumericDocValues` directly.
  org.apache.lucene.index.LegacySortedDocValues Use `SortedDocValues` instead.
  org.apache.lucene.index.LegacySortedDocValuesWrapper Implement `SortedDocValues` directly.
  org.apache.lucene.index.LegacySortedNumericDocValues Use `SortedNumericDocValues` instead.
  org.apache.lucene.index.LegacySortedNumericDocValuesWrapper Implement `SortedNumericDocValues` directly.
  org.apache.lucene.index.LegacySortedSetDocValues Use `SortedSetDocValues` instead.
  org.apache.lucene.index.LegacySortedSetDocValuesWrapper Implement `SortedSetDocValues` directly.
  org.apache.lucene.index.MergePolicyWrapper replace with FilterMergePolicy
  org.apache.lucene.store.RAMDirectory This class uses inefficient synchronization and is discouraged in favor of `MMapDirectory`. It will be removed in future versions of Lucene.
  org.apache.lucene.store.RAMFile This class uses inefficient synchronization and is discouraged in favor of `MMapDirectory`. It will be removed in future versions of Lucene.
  org.apache.lucene.store.RAMInputStream This class uses inefficient synchronization and is discouraged in favor of `MMapDirectory`. It will be removed in future versions of Lucene.
  org.apache.lucene.store.RAMOutputStream This class uses inefficient synchronization and is discouraged in favor of `MMapDirectory`. It will be removed in future versions of Lucene.
  org.apache.lucene.analysis.standard.StandardFilter StandardFilter is a no-op and can be removed from code

- Deprecated Fields
  Field and Description
  org.apache.lucene.search.QueryCachingPolicy.ALWAYS_CACHE This policy is inefficient as caching too aggressively disables the ability to skip non-interesting documents. See `UsageTrackingQueryCachingPolicy`.
  org.apache.lucene.search.FuzzyQuery.defaultMinSimilarity pass integer edit distances instead.
  org.apache.lucene.analysis.standard.StandardAnalyzer.ENGLISH_STOP_WORDS_SET Use the stop words on EnglishAnalyzer in the analysis-common module
  org.apache.lucene.util.Version.LUCENE_6_0_0 (7.0.0) Use latest
  org.apache.lucene.util.Version.LUCENE_6_0_1 Use latest
  org.apache.lucene.util.Version.LUCENE_6_1_0 Use latest
  org.apache.lucene.util.Version.LUCENE_6_2_0 Use latest
  org.apache.lucene.util.Version.LUCENE_6_2_1 Use latest
  org.apache.lucene.util.Version.LUCENE_6_3_0 Use latest
  org.apache.lucene.util.Version.LUCENE_6_4_0 Use latest
  org.apache.lucene.util.Version.LUCENE_6_4_1 Use latest
  org.apache.lucene.util.Version.LUCENE_6_4_2 Use latest
  org.apache.lucene.util.Version.LUCENE_6_5_0 Use latest
  org.apache.lucene.util.Version.LUCENE_6_5_1 Use latest
  org.apache.lucene.util.Version.LUCENE_6_6_0 Use latest
  org.apache.lucene.util.Version.LUCENE_6_6_1 Use latest
  org.apache.lucene.util.Version.LUCENE_6_6_2 Use latest
  org.apache.lucene.util.Version.LUCENE_6_6_3 Use latest
  org.apache.lucene.util.Version.LUCENE_6_6_4 Use latest
  org.apache.lucene.util.Version.LUCENE_6_6_5 Use latest
  org.apache.lucene.util.Version.LUCENE_6_6_6 Use latest
  org.apache.lucene.util.Version.LUCENE_7_0_0 (7.1.0) Use latest
  org.apache.lucene.util.Version.LUCENE_7_0_1 Use latest
  org.apache.lucene.util.Version.LUCENE_7_1_0 (7.2.0) Use latest
  org.apache.lucene.util.Version.LUCENE_7_2_0 (7.3.0) Use latest
  org.apache.lucene.util.Version.LUCENE_7_2_1 (7.3.0) Use latest
  org.apache.lucene.util.Version.LUCENE_7_3_0 (7.4.0) Use latest
  org.apache.lucene.util.Version.LUCENE_7_3_1 Use latest
  org.apache.lucene.util.Version.LUCENE_7_4_0 (7.5.0) Use latest
  org.apache.lucene.util.Version.LUCENE_7_5_0 (7.6.0) Use latest
  org.apache.lucene.util.Version.LUCENE_7_6_0 (7.7.0) Use latest
  org.apache.lucene.util.Version.LUCENE_7_7_0 (7.7.1) Use latest
  org.apache.lucene.util.Version.LUCENE_7_7_1 (7.7.2) Use latest
  org.apache.lucene.util.Version.LUCENE_CURRENT Use `Version.LATEST`
  org.apache.lucene.util.Constants.LUCENE_MAIN_VERSION Use `Version.LATEST`
  org.apache.lucene.util.Constants.LUCENE_VERSION Use `Version.LATEST`
  org.apache.lucene.util.RamUsageEstimator.NUM_BYTES_BOOLEAN use `1` instead.
  org.apache.lucene.util.RamUsageEstimator.NUM_BYTES_BYTE use `1` instead.
  org.apache.lucene.util.RamUsageEstimator.NUM_BYTES_CHAR use `Character.BYTES` instead.
  org.apache.lucene.util.RamUsageEstimator.NUM_BYTES_DOUBLE use `Double.BYTES` instead.
  org.apache.lucene.util.RamUsageEstimator.NUM_BYTES_FLOAT use `Float.BYTES` instead.
  org.apache.lucene.util.RamUsageEstimator.NUM_BYTES_INT use `Integer.BYTES` instead.
  org.apache.lucene.util.RamUsageEstimator.NUM_BYTES_LONG use `Long.BYTES` instead.
  org.apache.lucene.util.RamUsageEstimator.NUM_BYTES_SHORT use `Short.BYTES` instead.
  org.apache.lucene.analysis.standard.StandardAnalyzer.STOP_WORDS_SET Use the stop words on EnglishAnalyzer in the analysis-common module

- Deprecated Methods
  Method and Description
  org.apache.lucene.index.PostingsEnum.attributes() this method is unused and will be removed in 7.0
  org.apache.lucene.codecs.LegacyDocValuesIterables.binaryIterable(FieldInfo, DocValuesProducer, int) Consume `BinaryDocValues` instead.
  org.apache.lucene.util.StringHelper.compare(int, byte[], int, byte[], int) Use FutureArrays.compareUnsigned instead.
  org.apache.lucene.search.similarities.Similarity.SimScorer.computePayloadFactor(int, int, int, BytesRef)
  org.apache.lucene.search.similarities.Similarity.SimScorer.computeSlopFactor(int)
  org.apache.lucene.search.TopFieldCollector.create(Sort, int, boolean, boolean, boolean) Use `TopFieldCollector.create(Sort, int, boolean, boolean, boolean, boolean)`
  org.apache.lucene.search.TopFieldCollector.create(Sort, int, FieldDoc, boolean, boolean, boolean) Use `TopFieldCollector.create(Sort, int, FieldDoc, boolean, boolean, boolean, boolean)`
  org.apache.lucene.search.IndexSearcher.createNormalizedWeight(Query, boolean) Clients should rewrite the query and then call `IndexSearcher.createWeight(Query, boolean, float)` with a boost value of 1f
  org.apache.lucene.search.FuzzyQuery.floatToEdits(float, int) pass integer edit distances instead.
  org.apache.lucene.util.CharsRef.getUTF16SortedAsUTF8Comparator() This comparator is only a transition mechanism
  org.apache.lucene.util.SloppyMath.haversinKilometers(double, double, double, double) Use `instead`
  org.apache.lucene.index.IndexWriter.maxDoc() use `IndexWriter.getDocStats()` instead
  org.apache.lucene.codecs.LegacyDocValuesIterables.normsIterable(FieldInfo, NormsProducer, int) Consume `NumericDocValues` instead.
  org.apache.lucene.index.IndexWriter.numDocs() use `IndexWriter.getDocStats()` instead
  org.apache.lucene.codecs.LegacyDocValuesIterables.numericIterable(FieldInfo, DocValuesProducer, int) Consume `NumericDocValues` instead.
  org.apache.lucene.util.IOUtils.reThrow(Throwable) This method is deprecated in favor of `IOUtils.rethrowAlways(java.lang.Throwable)`. Code should be updated to `IOUtils.rethrowAlways(java.lang.Throwable)` and guarded with an additional null-argument check (because `IOUtils.rethrowAlways(java.lang.Throwable)` is not accepting null arguments).
  org.apache.lucene.util.IOUtils.reThrowUnchecked(Throwable) This method is deprecated in favor of `IOUtils.rethrowAlways(java.lang.Throwable)`. Code should be updated to `IOUtils.rethrowAlways(java.lang.Throwable)` and guarded with an additional null-argument check (because `IOUtils.rethrowAlways(java.lang.Throwable)` is not accepting null arguments).
  org.apache.lucene.search.similarities.TFIDFSimilarity.scorePayload(int, int, int, BytesRef)
  org.apache.lucene.search.similarities.TFIDFSimilarity.sloppyFreq(int)
  org.apache.lucene.codecs.LegacyDocValuesIterables.sortedNumericToDocCount(DocValuesProducer, FieldInfo, int) Consume `SortedDocValues` instead.
  org.apache.lucene.codecs.LegacyDocValuesIterables.sortedNumericToValues(DocValuesProducer, FieldInfo) Consume `SortedDocValues` instead.
  org.apache.lucene.codecs.LegacyDocValuesIterables.sortedOrdIterable(DocValuesProducer, FieldInfo, int) Consume `SortedDocValues` instead.
  org.apache.lucene.codecs.LegacyDocValuesIterables.sortedSetOrdCountIterable(DocValuesProducer, FieldInfo, int) Consume `SortedSetDocValues` instead.
  org.apache.lucene.codecs.LegacyDocValuesIterables.sortedSetOrdsIterable(DocValuesProducer, FieldInfo) Consume `SortedSetDocValues` instead.
  org.apache.lucene.codecs.LegacyDocValuesIterables.valuesIterable(SortedDocValues) Consume `SortedDocValues` instead.
  org.apache.lucene.codecs.LegacyDocValuesIterables.valuesIterable(SortedSetDocValues) Consume `SortedSetDocValues` instead.

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.