You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2016/03/12 01:27:07 UTC

[26/50] [abbrv] lucene-solr git commit: LUCENE-7087: Let MemoryIndex#fromDocument(...) accept 'Iterable' as document instead of 'Document'

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/0b8b16f9
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0b8b16f9
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0b8b16f9

Branch: refs/heads/jira/SOLR-445
Commit: 0b8b16f9f281f10d730019f6e291b31f42b936c7
Parents: 66cd070
Author: Martijn van Groningen <ma...@gmail.com>
Authored: Thu Mar 10 09:12:38 2016 +0100
Committer: Martijn van Groningen <mv...@apache.org>
Committed: Thu Mar 10 14:05:54 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/0b8b16f9/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 7e803cf..a07e69d 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -14,6 +14,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/0b8b16f9/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);