LUCENE-8388: Remove PostingsEnum#attributes()

This commit is contained in:
Alan Woodward 2018-07-06 17:59:18 +01:00
parent 7d8ef9e39d
commit 6d6e67140b
3 changed files with 3 additions and 14 deletions

View File

@ -53,6 +53,9 @@ API Changes
* LUCENE-8373: StandardAnalyzer.ENGLISH_STOP_WORD_SET has been removed
(Alan Woodward)
* LUCENE-8388: Unused PostingsEnum#attributes() method has been removed
(Alan Woodward)
Changes in Runtime Behavior
* LUCENE-8333: Switch MoreLikeThis.setMaxDocFreqPct to use maxDoc instead of

View File

@ -236,11 +236,6 @@ public abstract class FilterLeafReader extends LeafReader {
this.in = in;
}
@Override
public AttributeSource attributes() {
return in.attributes();
}
@Override
public int docID() {
return in.docID();

View File

@ -20,7 +20,6 @@ package org.apache.lucene.index;
import java.io.IOException;
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.util.AttributeSource;
import org.apache.lucene.util.BytesRef;
/** Iterates through the postings.
@ -63,8 +62,6 @@ public abstract class PostingsEnum extends DocIdSetIterator {
return (flags & feature) == feature;
}
private AttributeSource atts = null;
/** Sole constructor. (For invocation by subclass
* constructors, typically implicit.) */
protected PostingsEnum() {
@ -81,12 +78,6 @@ public abstract class PostingsEnum extends DocIdSetIterator {
* the result of this method is undefined.
*/
public abstract int freq() throws IOException;
/** Returns the related attributes. */
public AttributeSource attributes() {
if (atts == null) atts = new AttributeSource();
return atts;
}
/**
* Returns the next position, or -1 if positions were not indexed.