# Deprecated API

## Contents

- Deprecated Classes
- Deprecated Enums
- Deprecated Fields
- Deprecated Methods
- Deprecated Constructors

- Deprecated Classes
  Class and Description
  org.apache.lucene.document.LegacyDoubleField Please use `DoublePoint` instead
  org.apache.lucene.document.LegacyFloatField Please use `FloatPoint` instead
  org.apache.lucene.document.LegacyIntField Please use `IntPoint` instead
  org.apache.lucene.document.LegacyLongField Please use `LongPoint` instead
  org.apache.lucene.search.LegacyNumericRangeQuery Instead index with `IntPoint`, `LongPoint`, `FloatPoint`, `DoublePoint`, and create range queries with `IntPoint.newRangeQuery()`, `LongPoint.newRangeQuery()`, `FloatPoint.newRangeQuery()`, `DoublePoint.newRangeQuery()` respectively. See `PointValues` for background information on Points.
  org.apache.lucene.analysis.LegacyNumericTokenStream Please switch to `PointValues` instead
  org.apache.lucene.util.LegacyNumericUtils Please use `PointValues` instead.
  org.apache.lucene.analysis.Token This class is outdated and no longer used since Lucene 2.9. Nuke it finally!

- Deprecated Enums
  Enum and Description
  org.apache.lucene.document.FieldType.LegacyNumericType Please switch to `PointValues` instead

- Deprecated Fields
  Field and Description
  org.apache.lucene.analysis.standard.StandardTokenizer.ACRONYM (3.1)
  org.apache.lucene.analysis.standard.StandardTokenizer.ACRONYM_DEP (3.1)
  org.apache.lucene.analysis.standard.StandardTokenizer.APOSTROPHE (3.1)
  org.apache.lucene.analysis.standard.StandardTokenizer.CJ (3.1)
  org.apache.lucene.analysis.standard.StandardTokenizer.COMPANY (3.1)
  org.apache.lucene.search.FuzzyQuery.defaultMinSimilarity pass integer edit distances instead.
  org.apache.lucene.analysis.standard.StandardTokenizer.HOST (3.1)
  org.apache.lucene.util.Version.LUCENE_5_0_0 (5.0) Use latest
  org.apache.lucene.util.Version.LUCENE_5_1_0 Use latest
  org.apache.lucene.util.Version.LUCENE_5_2_0 Use latest
  org.apache.lucene.util.Version.LUCENE_5_2_1 Use latest
  org.apache.lucene.util.Version.LUCENE_5_3_0 Use latest
  org.apache.lucene.util.Version.LUCENE_5_3_1 Use latest
  org.apache.lucene.util.Version.LUCENE_5_3_2 Use latest
  org.apache.lucene.util.Version.LUCENE_5_4_0 Use latest
  org.apache.lucene.util.Version.LUCENE_5_4_1 Use latest
  org.apache.lucene.util.Version.LUCENE_5_5_0 Use latest
  org.apache.lucene.util.Version.LUCENE_5_5_1 Use latest
  org.apache.lucene.util.Version.LUCENE_5_5_2 Use latest
  org.apache.lucene.util.Version.LUCENE_5_5_3 Use latest
  org.apache.lucene.util.Version.LUCENE_5_5_4 Use latest
  org.apache.lucene.util.Version.LUCENE_5_5_5 Use latest
  org.apache.lucene.util.Version.LUCENE_6_0_0 (6.1.0) Use latest
  org.apache.lucene.util.Version.LUCENE_6_0_1 Use latest
  org.apache.lucene.util.Version.LUCENE_6_1_0 (6.2.0) Use latest
  org.apache.lucene.util.Version.LUCENE_6_2_0 (6.3.0) Use latest
  org.apache.lucene.util.Version.LUCENE_6_2_1 Use latest
  org.apache.lucene.util.Version.LUCENE_6_3_0 (6.4.0) Use latest
  org.apache.lucene.util.Version.LUCENE_6_4_0 (6.5.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 (6.6.0) Use latest
  org.apache.lucene.util.Version.LUCENE_6_5_1 Use latest
  org.apache.lucene.util.Version.LUCENE_6_6_0 (6.6.1) Use latest
  org.apache.lucene.util.Version.LUCENE_6_6_1 (6.6.2) Use latest
  org.apache.lucene.util.Version.LUCENE_6_6_2 (6.6.3) Use latest
  org.apache.lucene.util.Version.LUCENE_6_6_3 (6.6.4) Use latest
  org.apache.lucene.util.Version.LUCENE_6_6_4 (6.6.5) 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.

- Deprecated Methods
  Method and Description
  org.apache.lucene.index.IndexableField.boost() Index-time boosts are deprecated, please index index-time scoring factors into a doc value field and combine them with the score at query time using eg. FunctionScoreQuery.
  org.apache.lucene.search.FuzzyQuery.floatToEdits(float, int) pass integer edit distances instead.
  org.apache.lucene.index.IndexWriter.getCommitData() Use `IndexWriter.getLiveCommitData()` 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.isLocked(Directory) Use of this method can only lead to race conditions. Try to actually obtain a lock instead.
  org.apache.lucene.document.FieldType.numericPrecisionStep() Please switch to `PointValues` instead
  org.apache.lucene.document.FieldType.numericType() Please switch to `PointValues` instead
  org.apache.lucene.store.DataInput.readStringSet() Only for reading existing formats. Encode maps with `DataOutput.writeSetOfStrings(Set)` instead.
  org.apache.lucene.store.DataInput.readStringStringMap() Only for reading existing formats. Encode maps with `DataOutput.writeMapOfStrings(Map)` instead.
  org.apache.lucene.store.Directory.renameFile(String, String) Use `Directory.rename(java.lang.String, java.lang.String)` and `Directory.syncMetaData()` 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.document.Field.setBoost(float) Index-time boosts are deprecated, please index index-time scoring factors into a doc value field and combine them with the score at query time using eg. FunctionScoreQuery.
  org.apache.lucene.index.IndexWriter.setCommitData(Map<String, String>) Use `IndexWriter.setLiveCommitData(java.lang.Iterable<java.util.Map.Entry<java.lang.String, java.lang.String>>)` instead.
  org.apache.lucene.document.FieldType.setNumericPrecisionStep(int) Please switch to `PointValues` instead
  org.apache.lucene.document.FieldType.setNumericType(FieldType.LegacyNumericType) Please switch to `PointValues` instead
  org.apache.lucene.search.Explanation.toHtml()
  org.apache.lucene.store.DataOutput.writeStringSet(Set<String>) Use `DataOutput.writeMapOfStrings(Map)` instead.
  org.apache.lucene.store.DataOutput.writeStringStringMap(Map<String, String>) Use `DataOutput.writeMapOfStrings(Map)` instead.

- Deprecated Constructors
  Constructor and Description
  org.apache.lucene.search.similarities.PerFieldSimilarityWrapper() specify a default similarity for non field-specific calculations.

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