Skip navigation links
  • Overview
  • Module
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help

Deprecated API

Contents

  • Terminally Deprecated
  • Interfaces
  • Classes
  • Enum Classes
  • Exceptions
  • Fields
  • Methods
  • Constructors
  • Enum Constants
  • Terminally Deprecated Elements
    Element
    Description
    org.apache.lucene.analysis.ja.dict.BinaryDictionary.getResource(BinaryDictionary.ResourceScheme, String)
    org.apache.lucene.analysis.ja.dict.BinaryDictionary.ResourceScheme
    org.apache.lucene.analysis.ja.dict.ConnectionCosts(BinaryDictionary.ResourceScheme, String)
    replaced by ConnectionCosts(Path) for files and ConnectionCosts(URL) for classpath/module resources.
    org.apache.lucene.analysis.ja.dict.TokenInfoDictionary(BinaryDictionary.ResourceScheme, String)
    replaced by TokenInfoDictionary(Path, Path, Path, Path) for files and TokenInfoDictionary(URL, URL, URL, URL) for classpath/module resources
    org.apache.lucene.analysis.ja.dict.UnknownDictionary(BinaryDictionary.ResourceScheme, String)
    replaced by UnknownDictionary(Path, Path, Path) for files and UnknownDictionary(URL, URL, URL) for classpath/module resources
    org.apache.lucene.analysis.ko.dict.BinaryDictionary.getResource(BinaryDictionary.ResourceScheme, String)
    org.apache.lucene.analysis.ko.dict.BinaryDictionary.ResourceScheme
    org.apache.lucene.analysis.ko.dict.ConnectionCosts(BinaryDictionary.ResourceScheme, String)
    replaced by ConnectionCosts(Path) for files and ConnectionCosts(URL) for classpath/module resources.
    org.apache.lucene.analysis.ko.dict.TokenInfoDictionary(BinaryDictionary.ResourceScheme, String)
    replaced by TokenInfoDictionary(Path, Path, Path, Path) for files and TokenInfoDictionary(URL, URL, URL, URL) for classpath/module resources
    org.apache.lucene.analysis.ko.dict.UnknownDictionary(BinaryDictionary.ResourceScheme, String)
    replaced by UnknownDictionary(Path, Path, Path) for files and UnknownDictionary(URL, URL, URL) for classpath/module resources
    org.apache.lucene.analysis.StopwordAnalyzerBase.loadStopwordSet(boolean, Class<? extends Analyzer>, String, String)
    Class.getResourceAsStream(String) is caller sensitive and cannot load resources across Java Modules. Please call the getResourceAsStream() and WordlistLoader.getWordSet(Reader, String, CharArraySet) or other methods directly.
    org.apache.lucene.store.MMapDirectory.setUseUnmap(boolean)
    Please use new system property MMapDirectory.ENABLE_UNMAP_HACK_SYSPROP instead
    org.apache.lucene.util.IOUtils.getDecodingReader(Class<?>, String, Charset)
    Class.getResourceAsStream(String) is caller sensitive and cannot load resources across Java Modules. Please call the getResourceAsStream() directly and use IOUtils.requireResourceNonNull(Object,String) to signal missing resources null
    org.apache.lucene.util.IOUtils.IOConsumer
    was replaced by IOConsumer.
    org.apache.lucene.util.IOUtils.IOFunction
    was replaced by IOFunction.
  • Deprecated Interfaces
    Interface
    Description
    org.apache.lucene.util.IOUtils.IOConsumer
    was replaced by IOConsumer.
    org.apache.lucene.util.IOUtils.IOFunction
    was replaced by IOFunction.
  • Deprecated Classes
    Class
    Description
    org.apache.lucene.analysis.es.SpanishMinimalStemFilter
    Use SpanishPluralStemFilter instead.
    org.apache.lucene.analysis.es.SpanishMinimalStemFilterFactory
    Use SpanishPluralStemFilterFactory instead
    org.apache.lucene.analysis.es.SpanishMinimalStemmer
    Use SpanishPluralStemmer instead.
    org.apache.lucene.analysis.miscellaneous.FixBrokenOffsetsFilter
    Fix the token filters that create broken offsets in the first place.
    org.apache.lucene.analysis.miscellaneous.FixBrokenOffsetsFilterFactory
    org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter
    Use WordDelimiterGraphFilter instead: it produces a correct token graph so that e.g. PhraseQuery works correctly when it's used in the search time analyzer.
    org.apache.lucene.analysis.miscellaneous.WordDelimiterFilterFactory
    Use WordDelimiterGraphFilterFactory instead: it produces a correct token graph so that e.g. PhraseQuery works correctly when it's used in the search time analyzer.
    org.apache.lucene.analysis.synonym.SynonymFilter
    Use SynonymGraphFilter instead, but be sure to also use FlattenGraphFilter at index time (not at search time) as well.
    org.apache.lucene.analysis.synonym.SynonymFilterFactory
    Use SynonymGraphFilterFactory instead, but be sure to also use FlattenGraphFilterFactory at index time (not at search time) as well.
    org.apache.lucene.document.KnnVectorField
    use KnnFloatVectorField instead
    org.apache.lucene.index.VectorValues
    use FloatVectorValues instead
    org.apache.lucene.search.DocValuesFieldExistsQuery
    Use FieldExistsQuery instead.
    org.apache.lucene.search.KnnVectorFieldExistsQuery
    Use FieldExistsQuery instead.
    org.apache.lucene.search.KnnVectorQuery
    use KnnFloatVectorQuery instead
    org.apache.lucene.search.NormsFieldExistsQuery
    Use FieldExistsQuery instead.
    org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder
    Visibility of this class will be reduced in a future release. Users can access this functionality directly through Automata.makeStringUnion(Iterable)
    org.apache.lucene.util.CharsRef.UTF16SortedAsUTF8Comparator
    This comparator is only a transition mechanism
  • Deprecated Enum Classes
    Enum Class
    Description
    org.apache.lucene.analysis.ja.dict.BinaryDictionary.ResourceScheme
    org.apache.lucene.analysis.ko.dict.BinaryDictionary.ResourceScheme
  • Deprecated Exceptions
    Exceptions
    Description
    org.apache.lucene.search.BooleanQuery.TooManyClauses
    use IndexSearcher.TooManyClauses
  • Deprecated Fields
    Field
    Description
    org.apache.lucene.expressions.js.JavascriptLexer.tokenNames
    Use JavascriptLexer.VOCABULARY instead.
    org.apache.lucene.expressions.js.JavascriptParser.tokenNames
    Use JavascriptParser.VOCABULARY instead.
    org.apache.lucene.index.SortedSetDocValues.NO_MORE_ORDS
    Will be removed in a future version. Please use SortedSetDocValues.docValueCount() to know the number of doc values for the current document up-front.
    org.apache.lucene.search.SortField.optimizeSortWithIndexedData
    org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder.MAX_TERM_LENGTH
    See Automata.MAX_STRING_UNION_TERM_LENGTH
    org.apache.lucene.util.BitUtil.VH_BE_DOUBLE
    Better use little endian unless it is needed for backwards compatibility.
    org.apache.lucene.util.BitUtil.VH_BE_FLOAT
    Better use little endian unless it is needed for backwards compatibility.
    org.apache.lucene.util.BitUtil.VH_BE_INT
    Better use little endian unless it is needed for backwards compatibility.
    org.apache.lucene.util.BitUtil.VH_BE_LONG
    Better use little endian unless it is needed for backwards compatibility.
    org.apache.lucene.util.BitUtil.VH_BE_SHORT
    Better use little endian unless it is needed for backwards compatibility.
    org.apache.lucene.util.CharsRef.utf16SortedAsUTF8SortOrder
    This comparator is only a transition mechanism
    org.apache.lucene.util.Constants.JAVA_VERSION
    To detect Java versions use Runtime.version()
    org.apache.lucene.util.Constants.JRE_IS_MINIMUM_JAVA11
    This constant is useless and always true. To detect Java versions use Runtime.version()
    org.apache.lucene.util.Constants.JRE_IS_MINIMUM_JAVA8
    This constant is useless and always true. To detect Java versions use Runtime.version()
    org.apache.lucene.util.Constants.JRE_IS_MINIMUM_JAVA9
    This constant is useless and always true. To detect Java versions use Runtime.version()
    org.apache.lucene.util.Constants.JVM_SPEC_VERSION
    To detect Java versions use Runtime.version()
    org.apache.lucene.util.Constants.JVM_VERSION
    To detect Java versions use Runtime.version()
    org.apache.lucene.util.Version.LUCENE_8_0_0
    (9.0.0) Use latest
    org.apache.lucene.util.Version.LUCENE_8_1_0
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_1_1
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_10_0
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_10_1
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_11_0
    (8.11.1) Use latest
    org.apache.lucene.util.Version.LUCENE_8_11_1
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_11_2
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_12_0
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_2_0
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_3_0
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_3_1
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_4_0
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_4_1
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_5_0
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_5_1
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_5_2
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_6_0
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_6_1
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_6_2
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_6_3
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_7_0
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_8_0
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_8_1
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_8_2
    Use latest
    org.apache.lucene.util.Version.LUCENE_8_9_0
    Use latest
    org.apache.lucene.util.Version.LUCENE_9_0_0
    (9.1.0) Use latest
    org.apache.lucene.util.Version.LUCENE_9_1_0
    (9.2.0) Use latest
    org.apache.lucene.util.Version.LUCENE_9_2_0
    (9.3.0) Use latest
    org.apache.lucene.util.Version.LUCENE_9_3_0
    (9.4.0) Use latest
    org.apache.lucene.util.Version.LUCENE_9_4_0
    (9.5.0) Use latest
    org.apache.lucene.util.Version.LUCENE_9_4_1
    Use latest
    org.apache.lucene.util.Version.LUCENE_9_4_2
    Use latest
    org.apache.lucene.util.Version.LUCENE_9_5_0
    (9.6.0) Use latest
    org.apache.lucene.util.Version.LUCENE_9_6_0
    (9.7.0) Use latest
    org.apache.lucene.util.Version.LUCENE_9_7_0
    (9.8.0) Use latest
    org.apache.lucene.util.Version.LUCENE_9_8_0
    (9.9.0) Use latest
    org.apache.lucene.util.Version.LUCENE_9_9_0
    (9.9.1) Use latest
    org.apache.lucene.util.Version.LUCENE_CURRENT
    Use Version.LATEST
  • Deprecated Methods
    Method
    Description
    org.apache.lucene.analysis.ja.dict.BinaryDictionary.getResource(BinaryDictionary.ResourceScheme, String)
    org.apache.lucene.analysis.ko.dict.BinaryDictionary.getResource(BinaryDictionary.ResourceScheme, String)
    org.apache.lucene.analysis.StopwordAnalyzerBase.loadStopwordSet(boolean, Class<? extends Analyzer>, String, String)
    Class.getResourceAsStream(String) is caller sensitive and cannot load resources across Java Modules. Please call the getResourceAsStream() and WordlistLoader.getWordSet(Reader, String, CharArraySet) or other methods directly.
    org.apache.lucene.document.LongPoint.newDistanceFeatureQuery(String, float, long, long)
    org.apache.lucene.expressions.js.JavascriptLexer.getTokenNames()
    org.apache.lucene.expressions.js.JavascriptParser.getTokenNames()
    org.apache.lucene.index.CodecReader.document(int, StoredFieldVisitor)
    org.apache.lucene.index.CodecReader.getTermVectors(int)
    org.apache.lucene.index.FilterCodecReader.document(int, StoredFieldVisitor)
    org.apache.lucene.index.FilterCodecReader.getTermVectors(int)
    org.apache.lucene.index.IndexReader.document(int)
    use IndexReader.storedFields() to retrieve one or more documents
    org.apache.lucene.index.IndexReader.document(int, Set<String>)
    use IndexReader.storedFields() to retrieve one or more documents
    org.apache.lucene.index.IndexReader.document(int, StoredFieldVisitor)
    use IndexReader.storedFields() to retrieve one or more documents
    org.apache.lucene.index.IndexReader.getTermVector(int, String)
    use IndexReader.termVectors() to retrieve one or more documents
    org.apache.lucene.index.IndexReader.getTermVectors(int)
    use IndexReader.termVectors() to retrieve one or more documents
    org.apache.lucene.index.SegmentReader.getThreadLocalFieldsReader()
    org.apache.lucene.index.SegmentReader.getThreadLocalTermVectorsReader()
    org.apache.lucene.search.BooleanQuery.getMaxClauseCount()
    use IndexSearcher.getMaxClauseCount()
    org.apache.lucene.search.BooleanQuery.setMaxClauseCount(int)
    use IndexSearcher.setMaxClauseCount(int)
    org.apache.lucene.search.highlight.TokenSources.getAnyTokenStream(IndexReader, int, String, Analyzer)
    org.apache.lucene.search.highlight.TokenSources.getAnyTokenStream(IndexReader, int, String, Document, Analyzer)
    org.apache.lucene.search.highlight.TokenSources.getTokenStream(String, String, Analyzer)
    org.apache.lucene.search.highlight.TokenSources.getTokenStream(Document, String, Analyzer)
    org.apache.lucene.search.highlight.TokenSources.getTokenStream(IndexReader, int, String, Analyzer)
    org.apache.lucene.search.highlight.TokenSources.getTokenStream(Terms)
    org.apache.lucene.search.highlight.TokenSources.getTokenStream(Terms, boolean)
    org.apache.lucene.search.highlight.TokenSources.getTokenStreamWithOffsets(IndexReader, int, String)
    org.apache.lucene.search.IndexSearcher.doc(int)
    Use IndexSearcher.storedFields() to access fields for one or more documents
    org.apache.lucene.search.IndexSearcher.doc(int, Set<String>)
    Use IndexSearcher.storedFields() to access fields for one or more documents
    org.apache.lucene.search.IndexSearcher.doc(int, StoredFieldVisitor)
    Use IndexSearcher.storedFields() to access fields for one or more documents
    org.apache.lucene.search.IndexSearcher.getExecutor()
    use IndexSearcher.getTaskExecutor() executor instead to execute concurrent tasks
    org.apache.lucene.search.join.BlockJoinSelector.wrap(NumericDocValues, BlockJoinSelector.Type, BitSet, BitSet)
    org.apache.lucene.search.join.BlockJoinSelector.wrap(SortedDocValues, BlockJoinSelector.Type, BitSet, BitSet)
    org.apache.lucene.search.join.BlockJoinSelector.wrap(SortedNumericDocValues, BlockJoinSelector.Type, BitSet, BitSet)
    org.apache.lucene.search.MultiTermQuery.setRewriteMethod(MultiTermQuery.RewriteMethod)
    set this using a constructor instead
    org.apache.lucene.search.Query.rewrite(IndexReader)
    Use Query.rewrite(IndexSearcher)
    org.apache.lucene.search.SortField.getOptimizeSortWithIndexedData()
    org.apache.lucene.search.SortField.getOptimizeSortWithPoints()
    This is a duplicate method for SortField#getOptimizeSortWithIndexedData.
    org.apache.lucene.search.SortField.setOptimizeSortWithIndexedData(boolean)
    should only be used for compatibility with 8.x indices that got created with inconsistent data across fields, or the wrong sort configuration in the index sort
    org.apache.lucene.search.SortField.setOptimizeSortWithPoints(boolean)
    should only be used for compatibility with 8.x indices that got created with inconsistent data across fields, or the wrong sort configuration in the index sort. This is a duplicate method for SortField#setOptimizeSortWithIndexedData.
    org.apache.lucene.search.TermInSetQuery.getTermData()
    the encoded terms will no longer be exposed in a future major version; this is an implementation detail that could change at some point and shouldn't be relied on directly
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.evaluateFlags(UnifiedHighlighter)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.setBreakIterator(Supplier<BreakIterator>)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.setCacheFieldValCharsThreshold(int)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.setFieldMatcher(Predicate<String>)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.setFormatter(PassageFormatter)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.setHandleMultiTermQuery(boolean)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.setHighlightPhrasesStrictly(boolean)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.setMaxLength(int)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.setMaxNoHighlightPassages(int)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.setPassageRelevancyOverSpeed(boolean)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.setScorer(PassageScorer)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.setWeightMatches(boolean)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.shouldHandleMultiTermQuery(String)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.shouldHighlightPhrasesStrictly(String)
    org.apache.lucene.search.uhighlight.UnifiedHighlighter.shouldPreferPassageRelevancyOverSpeed(String)
    org.apache.lucene.store.ByteBuffersDataInput.size()
    Use ByteBuffersDataInput.length() instead.
    org.apache.lucene.store.MMapDirectory.getPreload()
    This information is no longer reliable now that preloading is more granularly configured via a predicate.
    org.apache.lucene.store.MMapDirectory.getUseUnmap()
    use MMapDirectory.UNMAP_SUPPORTED
    org.apache.lucene.store.MMapDirectory.setPreload(boolean)
    Use MMapDirectory.setPreload(BiPredicate) instead which provides more granular control.
    org.apache.lucene.store.MMapDirectory.setUseUnmap(boolean)
    Please use new system property MMapDirectory.ENABLE_UNMAP_HACK_SYSPROP instead
    org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder.build(Iterable<BytesRef>)
    Please see Automata.makeStringUnion(Iterable) instead
    org.apache.lucene.util.CharsRef.getUTF16SortedAsUTF8Comparator()
    This comparator is only a transition mechanism
    org.apache.lucene.util.IOUtils.getDecodingReader(Class<?>, String, Charset)
    Class.getResourceAsStream(String) is caller sensitive and cannot load resources across Java Modules. Please call the getResourceAsStream() directly and use IOUtils.requireResourceNonNull(Object,String) to signal missing resources null
  • Deprecated Constructors
    Constructor
    Description
    org.apache.lucene.analysis.ja.dict.ConnectionCosts(BinaryDictionary.ResourceScheme, String)
    replaced by ConnectionCosts(Path) for files and ConnectionCosts(URL) for classpath/module resources.
    org.apache.lucene.analysis.ja.dict.TokenInfoDictionary(BinaryDictionary.ResourceScheme, String)
    replaced by TokenInfoDictionary(Path, Path, Path, Path) for files and TokenInfoDictionary(URL, URL, URL, URL) for classpath/module resources
    org.apache.lucene.analysis.ja.dict.UnknownDictionary(BinaryDictionary.ResourceScheme, String)
    replaced by UnknownDictionary(Path, Path, Path) for files and UnknownDictionary(URL, URL, URL) for classpath/module resources
    org.apache.lucene.analysis.ko.dict.ConnectionCosts(BinaryDictionary.ResourceScheme, String)
    replaced by ConnectionCosts(Path) for files and ConnectionCosts(URL) for classpath/module resources.
    org.apache.lucene.analysis.ko.dict.TokenInfoDictionary(BinaryDictionary.ResourceScheme, String)
    replaced by TokenInfoDictionary(Path, Path, Path, Path) for files and TokenInfoDictionary(URL, URL, URL, URL) for classpath/module resources
    org.apache.lucene.analysis.ko.dict.UnknownDictionary(BinaryDictionary.ResourceScheme, String)
    replaced by UnknownDictionary(Path, Path, Path) for files and UnknownDictionary(URL, URL, URL) for classpath/module resources
    org.apache.lucene.document.DoubleField(String, double)
    Use DoubleField(String, double, Field.Store) with Field.Store.NO instead.
    org.apache.lucene.document.FloatField(String, float)
    Use FloatField(String, float, Field.Store) with Field.Store.NO instead.
    org.apache.lucene.document.IntField(String, int)
    Use IntField(String, int, Field.Store) with Field.Store.NO instead.
    org.apache.lucene.document.LongField(String, long)
    Use LongField(String, long, Field.Store) with Field.Store.NO instead.
    org.apache.lucene.search.uhighlight.UnifiedHighlighter(IndexSearcher, Analyzer)
    org.apache.lucene.store.MMapDirectory(Path, int)
    use MMapDirectory(Path, long) instead.
    org.apache.lucene.store.MMapDirectory(Path, LockFactory, int)
    use MMapDirectory(Path, LockFactory, long) instead.
  • Deprecated Enum Constants
    Enum Constant
    Description
    org.apache.lucene.util.packed.PackedInts.Format.PACKED_SINGLE_BLOCK
    Use PackedInts.Format.PACKED instead.