lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject [2/2] lucene-solr git commit: LUCENE-7087: Let MemoryIndex#fromDocument(...) accept 'Iterable<? extends IndexableField>' as document instead of 'Document'
Date Thu, 10 Mar 2016 13:24:53 GMT
LUCENE-7087: Let MemoryIndex#fromDocument(...) accept 'Iterable<? extends IndexableField>'
as document instead of 'Document'


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

Branch: refs/heads/branch_6x
Commit: 73db4cab6a7f4948e803f649759781c84fbb3e3f
Parents: 02b0dd5
Author: Martijn van Groningen <martijn.v.groningen@gmail.com>
Authored: Thu Mar 10 09:12:38 2016 +0100
Committer: Martijn van Groningen <mvg@apache.org>
Committed: Thu Mar 10 14:24:15 2016 +0100

----------------------------------------------------------------------
 lucene/CHANGES.txt                                             | 5 +++++
 .../src/java/org/apache/lucene/index/memory/MemoryIndex.java   | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/73db4cab/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 3abd4fb..832f819 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -11,6 +11,11 @@ Optimizations
 * LUCENE-7071: Reduce bytes copying in OfflineSorter, giving ~10%
   speedup on merging 2D LatLonPoint values (Mike McCandless)
 
+Other
+
+* LUCENE-7087: Let MemoryIndex#fromDocument(...) accept 'Iterable<? extends IndexableField>'
+  as document instead of 'Document'. (Martijn van Groningen)
+
 ======================= Lucene 6.0.0 =======================
 
 System Requirements

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/73db4cab/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
----------------------------------------------------------------------
diff --git a/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java b/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
index 849cd63..9e01182 100644
--- a/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
+++ b/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
@@ -265,7 +265,7 @@ public class MemoryIndex {
    * @param analyzer the analyzer to use
    * @return a MemoryIndex
    */
-  public static MemoryIndex fromDocument(Document document, Analyzer analyzer) {
+  public static MemoryIndex fromDocument(Iterable<? extends IndexableField> document,
Analyzer analyzer) {
     return fromDocument(document, analyzer, false, false, 0);
   }
 
@@ -277,7 +277,7 @@ public class MemoryIndex {
    * @param storePayloads <code>true</code> if payloads should be stored
    * @return a MemoryIndex
    */
-  public static MemoryIndex fromDocument(Document document, Analyzer analyzer, boolean storeOffsets,
boolean storePayloads) {
+  public static MemoryIndex fromDocument(Iterable<? extends IndexableField> document,
Analyzer analyzer, boolean storeOffsets, boolean storePayloads) {
     return fromDocument(document, analyzer, storeOffsets, storePayloads, 0);
   }
 
@@ -290,7 +290,7 @@ public class MemoryIndex {
    * @param maxReusedBytes the number of bytes that should remain in the internal memory
pools after {@link #reset()} is called
    * @return a MemoryIndex
    */
-  public static MemoryIndex fromDocument(Document document, Analyzer analyzer, boolean storeOffsets,
boolean storePayloads, long maxReusedBytes) {
+  public static MemoryIndex fromDocument(Iterable<? extends IndexableField> document,
Analyzer analyzer, boolean storeOffsets, boolean storePayloads, long maxReusedBytes) {
     MemoryIndex mi = new MemoryIndex(storeOffsets, storePayloads, maxReusedBytes);
     for (IndexableField field : document) {
       mi.addField(field, analyzer);


Mime
View raw message