lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject lucenenet git commit: fix enumerators to use appropriate logic
Date Sun, 01 Feb 2015 10:57:57 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master d463487cc -> 26ebf9eaf


fix enumerators to use appropriate logic


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/26ebf9ea
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/26ebf9ea
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/26ebf9ea

Branch: refs/heads/master
Commit: 26ebf9eafc945ff7dbfd8275771badce487902b9
Parents: d463487
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Sat Jan 31 20:01:02 2015 -0500
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Sat Jan 31 20:01:02 2015 -0500

----------------------------------------------------------------------
 src/Lucene.Net.Core/Codecs/DocValuesConsumer.cs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/26ebf9ea/src/Lucene.Net.Core/Codecs/DocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/DocValuesConsumer.cs b/src/Lucene.Net.Core/Codecs/DocValuesConsumer.cs
index 9c13a1f..a5fafe3 100644
--- a/src/Lucene.Net.Core/Codecs/DocValuesConsumer.cs
+++ b/src/Lucene.Net.Core/Codecs/DocValuesConsumer.cs
@@ -324,7 +324,7 @@ namespace Lucene.Net.Codecs
                 {
                     int segOrd = dvs[readerUpTo].GetOrd(docIDUpTo);
                     docIDUpTo++;
-                    yield return map.GetGlobalOrd(readerUpTo, segOrd);
+                    yield return segOrd == -1 ? -1 : map.GetGlobalOrd(readerUpTo, segOrd);
                     continue;
                 }
 
@@ -618,8 +618,9 @@ namespace Lucene.Net.Codecs
 
                 if (ordUpto < ordLength)
                 {
+                    var value = ords[ordUpto];
                     ordUpto++;
-                    yield return ords[ordUpto];
+                    yield return value;
                     continue;
                 }
 


Mime
View raw message