lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romseyg...@apache.org
Subject [2/2] lucene-solr:branch_7x: LUCENE-8390: Replace MatchesIteratorSupplier with IOSupplier
Date Mon, 09 Jul 2018 12:05:22 GMT
LUCENE-8390: Replace MatchesIteratorSupplier with IOSupplier


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/80eb5da7
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/80eb5da7
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/80eb5da7

Branch: refs/heads/branch_7x
Commit: 80eb5da7393dd25c8cb566194eb9158de212bfb2
Parents: fddf35c
Author: Alan Woodward <romseygeek@apache.org>
Authored: Mon Jul 9 10:07:10 2018 +0100
Committer: Alan Woodward <romseygeek@apache.org>
Committed: Mon Jul 9 12:36:25 2018 +0100

----------------------------------------------------------------------
 lucene/CHANGES.txt                                     |  3 +++
 .../src/java/org/apache/lucene/search/Matches.java     | 13 +++----------
 2 files changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/80eb5da7/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 0e2bf33..534e29b 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -21,6 +21,9 @@ API Changes:
 
 * LUCENE-8388: PostingsEnum#attributes() has been deprecated (Alan Woodward)
 
+* LUCENE-8390: MatchesIteratorSupplier replaced by IOSupplier (Alan Woodward,
+  David Smiley)
+
 Bug Fixes:
 
 * LUCENE-8380: UTF8TaxonomyWriterCache inconsistency. (Ruslan Torobaev, Dawid Weiss)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/80eb5da7/lucene/core/src/java/org/apache/lucene/search/Matches.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/Matches.java b/lucene/core/src/java/org/apache/lucene/search/Matches.java
index de9a692..c832e74 100644
--- a/lucene/core/src/java/org/apache/lucene/search/Matches.java
+++ b/lucene/core/src/java/org/apache/lucene/search/Matches.java
@@ -26,6 +26,8 @@ import java.util.Objects;
 import java.util.stream.Collectors;
 import java.util.stream.StreamSupport;
 
+import org.apache.lucene.util.IOSupplier;
+
 /**
  * Reports the positions and optionally offsets of all matching terms in a query
  * for a single document
@@ -97,18 +99,9 @@ public interface Matches extends Iterable<String> {
   }
 
   /**
-   * A functional interface that supplies a {@link MatchesIterator}
-   */
-  @FunctionalInterface
-  interface MatchesIteratorSupplier {
-    /** Return a new {@link MatchesIterator} */
-    MatchesIterator get() throws IOException;
-  }
-
-  /**
    * Create a Matches for a single field
    */
-  static Matches forField(String field, MatchesIteratorSupplier mis) throws IOException {
+  static Matches forField(String field, IOSupplier<MatchesIterator> mis) throws IOException
{
 
     // The indirection here, using a Supplier object rather than a MatchesIterator
     // directly, is to allow for multiple calls to Matches.getMatches() to return


Mime
View raw message