Deprecated List (Lucene 2.4.1 API)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV NEXT | FRAMES NO FRAMES

## Deprecated API

Contents

- Deprecated Interfaces
- Deprecated Classes
- Deprecated Fields
- Deprecated Methods
- Deprecated Constructors

Deprecated Interfaces
org.apache.lucene.index.IndexCommitPoint Please subclass IndexCommit class instead

Deprecated Classes
org.apache.lucene.document.DateField If you build a new index, use `DateTools` instead. This class is included for use with existing indices and will be removed in a future release.
org.apache.lucene.search.Hit Hits will be removed in Lucene 3.0. Use `TopDocCollector` and `TopDocs` instead.
org.apache.lucene.search.HitIterator Hits will be removed in Lucene 3.0. Use `TopDocCollector` and `TopDocs` instead.
org.apache.lucene.search.Hits Hits will be removed in Lucene 3.0. Instead e. g. `TopDocCollector` and `TopDocs` can be used:
       TopDocCollector collector = new TopDocCollector(hitsPerPage);
       searcher.search(query, collector);
       ScoreDoc[] hits = collector.topDocs().scoreDocs;
       for (int i = 0; i < hits.length; i++) {
         int docId = hits[i].doc;
         Document d = searcher.doc(docId);
         // do something with current hit
         ...
org.apache.lucene.index.IndexModifier Please use `IndexWriter` instead.
org.apache.lucene.search.QueryFilter use a CachingWrapperFilter with QueryWrapperFilter

Deprecated Fields
org.apache.lucene.analysis.standard.StandardTokenizer.ACRONYM_DEP this solves a bug where HOSTs that end with '.' are identified as ACRONYMs. It is deprecated and will be removed in the next release.
org.apache.lucene.index.IndexWriter.DEFAULT_MAX_MERGE_DOCS
org.apache.lucene.index.IndexWriter.DEFAULT_MERGE_FACTOR
org.apache.lucene.store.FSDirectory.LOCK_DIR As of 2.1, `LOCK_DIR` is unused because the write.lock is now stored by default in the index directory. If you really want to store locks elsewhere you can create your own `SimpleFSLockFactory` (or `NativeFSLockFactory`, etc.) passing in your preferred lock directory. Then, pass this `LockFactory` instance to one of the `getDirectory` methods that take a `lockFactory` (for example, `FSDirectory.getDirectory(String, LockFactory)`).
org.apache.lucene.document.Field.Index.NO_NORMS This has been renamed to `Field.Index.NOT_ANALYZED_NO_NORMS`
org.apache.lucene.index.CheckIndex.out Use `CheckIndex.setInfoStream(java.io.PrintStream)` per instance, instead.
org.apache.lucene.analysis.standard.StandardTokenizer.tokenImage Please use `StandardTokenizer.TOKEN_TYPES` instead
org.apache.lucene.document.Field.Index.TOKENIZED this has been renamed to `Field.Index.ANALYZED`
org.apache.lucene.document.Field.Index.UN_TOKENIZED This has been renamed to `Field.Index.NOT_ANALYZED`

Deprecated Methods
org.apache.lucene.index.IndexWriter.abort() Please use `IndexWriter.rollback()` instead.
org.apache.lucene.queryParser.QueryParser.addClause(Vector, int, int, Query) use `QueryParser.addClause(List, int, int, Query)` instead.
org.apache.lucene.index.IndexWriter.addIndexes(Directory[]) Use `IndexWriter.addIndexesNoOptimize(org.apache.lucene.store.Directory[])` instead, then separately call `IndexWriter.optimize()` afterwards if you need to.
org.apache.lucene.document.Field.binaryValue() This method must allocate a new byte[] if the `AbstractField.getBinaryOffset()` is non-zero or `AbstractField.getBinaryLength()` is not the full length of the byte[]. Please use `AbstractField.getBinaryValue()` instead, which simply returns the byte[].
org.apache.lucene.search.RangeFilter.bits(IndexReader) Use `RangeFilter.getDocIdSet(IndexReader)` instead.
org.apache.lucene.search.PrefixFilter.bits(IndexReader) Use `PrefixFilter.getDocIdSet(IndexReader)` instead.
org.apache.lucene.search.Filter.bits(IndexReader) Use `Filter.getDocIdSet(IndexReader)` instead.
org.apache.lucene.search.CachingWrapperFilter.bits(IndexReader) Use `CachingWrapperFilter.getDocIdSet(IndexReader)` instead.
org.apache.lucene.search.QueryWrapperFilter.bits(IndexReader) Use `QueryWrapperFilter.getDocIdSet(IndexReader)` instead.
org.apache.lucene.search.CachingSpanFilter.bits(IndexReader) Use `CachingSpanFilter.getDocIdSet(IndexReader)` instead.
org.apache.lucene.search.RemoteCachingWrapperFilter.bits(IndexReader) Use `RemoteCachingWrapperFilter.getDocIdSet(IndexReader)` instead.
org.apache.lucene.index.CheckIndex.check(Directory, boolean) Please instantiate a CheckIndex and then use `CheckIndex.checkIndex()` instead
org.apache.lucene.index.CheckIndex.check(Directory, boolean, List) Please instantiate a CheckIndex and then use `CheckIndex.checkIndex(List)` instead
org.apache.lucene.index.IndexWriter.docCount() Please use `IndexWriter.maxDoc()` (same as this method) or `IndexWriter.numDocs()` (also takes deletions into account), instead.
org.apache.lucene.document.Document.fields() use `Document.getFields()` instead
org.apache.lucene.index.IndexWriter.flush() please call `IndexWriter.commit()`) instead
org.apache.lucene.search.SpanFilterResult.getBits() Use `SpanFilterResult.getDocIdSet()`
org.apache.lucene.queryParser.QueryParser.getBooleanQuery(Vector) use `QueryParser.getBooleanQuery(List)` instead
org.apache.lucene.queryParser.QueryParser.getBooleanQuery(Vector, boolean) use `QueryParser.getBooleanQuery(List, boolean)` instead
org.apache.lucene.queryParser.CharStream.getColumn()
org.apache.lucene.analysis.standard.StandardAnalyzer.getDefaultReplaceInvalidAcronym() This will be removed (hardwired to true) in 3.0
org.apache.lucene.store.FSDirectory.getDirectory(File, boolean) Use IndexWriter's create flag, instead, to create a new index.
org.apache.lucene.store.FSDirectory.getDirectory(String, boolean) Use IndexWriter's create flag, instead, to create a new index.
org.apache.lucene.queryParser.CharStream.getLine()
org.apache.lucene.index.IndexWriter.getMaxSyncPauseSeconds() This will be removed in 3.0, when autoCommit=true is removed from IndexWriter.
org.apache.lucene.search.spans.SpanFirstQuery.getTerms() use extractTerms instead
org.apache.lucene.search.spans.SpanNearQuery.getTerms() use extractTerms instead
org.apache.lucene.search.spans.SpanNotQuery.getTerms() use extractTerms instead
org.apache.lucene.search.spans.SpanTermQuery.getTerms() use extractTerms instead
org.apache.lucene.search.spans.SpanQuery.getTerms() use extractTerms instead
org.apache.lucene.search.spans.SpanOrQuery.getTerms() use extractTerms instead
org.apache.lucene.search.BooleanQuery.getUseScorer14() Use `BooleanQuery.getAllowDocsOutOfOrder()` instead.
org.apache.lucene.index.IndexReader.isLocked(Directory) Please use `IndexWriter.isLocked(Directory)` instead
org.apache.lucene.index.IndexReader.isLocked(String) Please use `IndexWriter.isLocked(String)` instead
org.apache.lucene.analysis.standard.StandardTokenizer.isReplaceInvalidAcronym() Remove in 3.X and make true the only valid value
org.apache.lucene.analysis.standard.StandardAnalyzer.isReplaceInvalidAcronym() This will be removed (hardwired to true) in 3.0
org.apache.lucene.analysis.TokenStream.next() The returned Token is a "full private copy" (not re-used across calls to next()) but will be slower than calling `TokenStream.next(Token)` instead..
org.apache.lucene.store.IndexInput.readChars(char[], int, int) -- please use readString or readBytes instead, and construct the string from those utf8 bytes
org.apache.lucene.store.FSDirectory.renameFile(String, String)
org.apache.lucene.store.Directory.renameFile(String, String)
org.apache.lucene.store.RAMDirectory.renameFile(String, String)
org.apache.lucene.search.Searcher.search(Query) Hits will be removed in Lucene 3.0. Use `Searcher.search(Query, Filter, int)` instead.
org.apache.lucene.search.Searcher.search(Query, Filter) Hits will be removed in Lucene 3.0. Use `Searcher.search(Query, Filter, int)` instead.
org.apache.lucene.search.Searcher.search(Query, Filter, Sort) Hits will be removed in Lucene 3.0. Use `Searcher.search(Query, Filter, int, Sort)` instead.
org.apache.lucene.search.Searcher.search(Query, Sort) Hits will be removed in Lucene 3.0. Use `Searcher.search(Query, Filter, int, Sort)` instead.
org.apache.lucene.analysis.standard.StandardAnalyzer.setDefaultReplaceInvalidAcronym(boolean) This will be removed (hardwired to true) in 3.0
org.apache.lucene.index.IndexWriter.setMaxSyncPauseSeconds(double) This will be removed in 3.0, when autoCommit=true is removed from IndexWriter.
org.apache.lucene.analysis.standard.StandardTokenizer.setReplaceInvalidAcronym(boolean) Remove in 3.X and make true the only valid value See https://issues.apache.org/jira/browse/LUCENE-1068
org.apache.lucene.analysis.standard.StandardAnalyzer.setReplaceInvalidAcronym(boolean) This will be removed (hardwired to true) in 3.0
org.apache.lucene.analysis.Token.setTermText(String) use `Token.setTermBuffer(char[], int, int)` or `Token.setTermBuffer(String)` or `Token.setTermBuffer(String, int, int)`.
org.apache.lucene.search.BooleanQuery.setUseScorer14(boolean) Use `BooleanQuery.setAllowDocsOutOfOrder(boolean)` instead.
org.apache.lucene.store.IndexInput.skipChars(int) this method operates on old "modified utf8" encoded strings
org.apache.lucene.analysis.Token.termText() This method now has a performance penalty because the text is stored internally in a char[]. If possible, use `Token.termBuffer()` and `Token.termLength()` directly instead. If you really need a String, use `Token.term()`
org.apache.lucene.index.IndexReader.unlock(Directory) Please use `IndexWriter.unlock(Directory)` instead
org.apache.lucene.store.IndexOutput.writeChars(char[], int, int) -- please pre-convert to utf8 bytes instead or use `IndexOutput.writeString(java.lang.String)`
org.apache.lucene.store.IndexOutput.writeChars(String, int, int) -- please pre-convert to utf8 bytes instead or use `IndexOutput.writeString(java.lang.String)`

Deprecated Constructors
org.apache.lucene.index.IndexReader(Directory) - use IndexReader()
org.apache.lucene.index.IndexWriter(Directory, Analyzer) This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(Directory,Analyzer,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
org.apache.lucene.index.IndexWriter(Directory, Analyzer, boolean) This constructor will be removed in the 3.0 release, and call `IndexWriter.commit()` when needed. Use `IndexWriter.IndexWriter(Directory,Analyzer,boolean,MaxFieldLength)` instead.
org.apache.lucene.index.IndexWriter(Directory, boolean, Analyzer) This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(Directory,Analyzer,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
org.apache.lucene.index.IndexWriter(Directory, boolean, Analyzer, boolean) This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(Directory,Analyzer,boolean,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
org.apache.lucene.index.IndexWriter(Directory, boolean, Analyzer, boolean, IndexDeletionPolicy) This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(Directory,Analyzer,boolean,IndexDeletionPolicy,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
org.apache.lucene.index.IndexWriter(Directory, boolean, Analyzer, IndexDeletionPolicy) This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(Directory,Analyzer,IndexDeletionPolicy,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
org.apache.lucene.index.IndexWriter(File, Analyzer) This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(File,Analyzer,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
org.apache.lucene.index.IndexWriter(File, Analyzer, boolean) This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(File,Analyzer,boolean,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
org.apache.lucene.index.IndexWriter(String, Analyzer) This constructor will be removed in the 3.0 release, and call `IndexWriter.commit()` when needed. Use `IndexWriter.IndexWriter(String,Analyzer,MaxFieldLength)` instead.
org.apache.lucene.index.IndexWriter(String, Analyzer, boolean) This constructor will be removed in the 3.0 release. Use `IndexWriter.IndexWriter(String,Analyzer,boolean,MaxFieldLength)` instead, and call `IndexWriter.commit()` when needed.
org.apache.lucene.index.MergePolicy.MergeException(String) Use `MergePolicy.MergeException.MergePolicy.MergeException(String,Directory)` instead
org.apache.lucene.index.MergePolicy.MergeException(Throwable) Use `MergePolicy.MergeException.MergePolicy.MergeException(Throwable,Directory)` instead
org.apache.lucene.search.SpanFilterResult(BitSet, List) Use `SpanFilterResult.SpanFilterResult(DocIdSet, List)` instead
org.apache.lucene.analysis.standard.StandardAnalyzer(boolean) Remove in 3.X and make true the only valid value
org.apache.lucene.analysis.standard.StandardAnalyzer(File, boolean) Remove in 3.X and make true the only valid value
org.apache.lucene.analysis.standard.StandardAnalyzer(Reader, boolean) Remove in 3.X and make true the only valid value
org.apache.lucene.analysis.standard.StandardAnalyzer(Set, boolean) Remove in 3.X and make true the only valid value
org.apache.lucene.analysis.standard.StandardAnalyzer(String[], boolean) Remove in 3.X and make true the only valid value
org.apache.lucene.analysis.Token(String, int, int)
org.apache.lucene.analysis.Token(String, int, int, int)
org.apache.lucene.analysis.Token(String, int, int, String)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV NEXT | FRAMES NO FRAMES

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