You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2018/07/06 17:16:47 UTC
[1/2] lucene-solr:master: LUCENE-8388: Remove
PostingsEnum#attributes()
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7x b3896b4eb -> 9a6706ed3
refs/heads/master 7d8ef9e39 -> 6d6e67140
LUCENE-8388: Remove PostingsEnum#attributes()
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/6d6e6714
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/6d6e6714
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/6d6e6714
Branch: refs/heads/master
Commit: 6d6e67140b44dfb45bd8aadc58e3b8bfb79f5016
Parents: 7d8ef9e
Author: Alan Woodward <ro...@apache.org>
Authored: Fri Jul 6 17:59:18 2018 +0100
Committer: Alan Woodward <ro...@apache.org>
Committed: Fri Jul 6 18:16:09 2018 +0100
----------------------------------------------------------------------
lucene/CHANGES.txt | 3 +++
.../src/java/org/apache/lucene/index/FilterLeafReader.java | 5 -----
.../core/src/java/org/apache/lucene/index/PostingsEnum.java | 9 ---------
3 files changed, 3 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6d6e6714/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 53c19d5..a526ae4 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6d6e6714/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java b/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java
index 3d86bee..8e1f272 100644
--- a/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java
+++ b/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java
@@ -237,11 +237,6 @@ public abstract class FilterLeafReader extends LeafReader {
}
@Override
- public AttributeSource attributes() {
- return in.attributes();
- }
-
- @Override
public int docID() {
return in.docID();
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6d6e6714/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java b/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java
index fdd32a9..e774a78 100644
--- a/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java
+++ b/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java
@@ -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.
[2/2] lucene-solr:branch_7x: LUCENE-8388: Deprecate
PostingsEnum#attributes()
Posted by ro...@apache.org.
LUCENE-8388: Deprecate PostingsEnum#attributes()
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9a6706ed
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9a6706ed
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9a6706ed
Branch: refs/heads/branch_7x
Commit: 9a6706ed32646e74fb64a8b2caa05fd6bc7e8a35
Parents: b3896b4
Author: Alan Woodward <ro...@apache.org>
Authored: Fri Jul 6 17:58:52 2018 +0100
Committer: Alan Woodward <ro...@apache.org>
Committed: Fri Jul 6 18:16:35 2018 +0100
----------------------------------------------------------------------
lucene/CHANGES.txt | 2 ++
.../core/src/java/org/apache/lucene/index/PostingsEnum.java | 7 ++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9a6706ed/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 19a868f..0e2bf33 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -19,6 +19,8 @@ API Changes:
* LUCENE-8379: Add experimental TermQuery.getTermStates method (Mike McCandless)
+* LUCENE-8388: PostingsEnum#attributes() has been deprecated (Alan Woodward)
+
Bug Fixes:
* LUCENE-8380: UTF8TaxonomyWriterCache inconsistency. (Ruslan Torobaev, Dawid Weiss)
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9a6706ed/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java b/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java
index fdd32a9..685ceeb 100644
--- a/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java
+++ b/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java
@@ -63,6 +63,7 @@ public abstract class PostingsEnum extends DocIdSetIterator {
return (flags & feature) == feature;
}
+ @Deprecated
private AttributeSource atts = null;
/** Sole constructor. (For invocation by subclass
@@ -82,7 +83,11 @@ public abstract class PostingsEnum extends DocIdSetIterator {
*/
public abstract int freq() throws IOException;
- /** Returns the related attributes. */
+ /**
+ * Returns the related attributes.
+ * @deprecated this method is unused and will be removed in 7.0
+ */
+ @Deprecated
public AttributeSource attributes() {
if (atts == null) atts = new AttributeSource();
return atts;