From 2bd663f6a12888c2c3106c80e877e8939e6d5a07 Mon Sep 17 00:00:00 2001 From: eaglet2006_cp Date: Tue, 1 Jan 2013 01:57:58 +0000 Subject: [PATCH] V1.2.8.8 Fix a problem of indexfileproxy. continue the loop when _DDXFileEnum[i].Current == null. --- .../Hubble.Core/Properties/AssemblyInfo.cs | 6 ++++-- .../Hubble.Core/Store/IndexFileProxy.cs | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/C#/src/Hubble.Data/Hubble.Core/Properties/AssemblyInfo.cs b/C#/src/Hubble.Data/Hubble.Core/Properties/AssemblyInfo.cs index 36f6d07..6a952f8 100644 --- a/C#/src/Hubble.Data/Hubble.Core/Properties/AssemblyInfo.cs +++ b/C#/src/Hubble.Data/Hubble.Core/Properties/AssemblyInfo.cs @@ -36,8 +36,8 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.2.8.7")] -[assembly: AssemblyFileVersion("1.2.8.7")] +[assembly: AssemblyVersion("1.2.8.8")] +[assembly: AssemblyFileVersion("1.2.8.8")] /***************************************************************************************** * Hubble.Core modification records @@ -248,4 +248,6 @@ select top 10 * from News where title match 'abc' order by score desc * Fix a bug. If the expression like : (a match 'xxx' or b match 'yyy') and c match 'xxx' ... * it should be a complex expression. Old version think it is not a complex expression and return * a small result when the expression has between keyword. + * 1.2.8.8 + * Fix a problem of indexfileproxy. continue the loop when _DDXFileEnum[i].Current == null. *****************************************************************************************/ \ No newline at end of file diff --git a/C#/src/Hubble.Data/Hubble.Core/Store/IndexFileProxy.cs b/C#/src/Hubble.Data/Hubble.Core/Store/IndexFileProxy.cs index 388aeb6..05ae2db 100644 --- a/C#/src/Hubble.Data/Hubble.Core/Store/IndexFileProxy.cs +++ b/C#/src/Hubble.Data/Hubble.Core/Store/IndexFileProxy.cs @@ -319,6 +319,8 @@ public IEnumerable MergedWordFilePostionList yield break; } + + //Get Min Doc id for (int i = 0; i < _DDXFileEnum.Length; i++) { @@ -328,6 +330,12 @@ public IEnumerable MergedWordFilePostionList continue; } + if (_DDXFileEnum[i].Current == null) + { + //DDXFile i reached end of the file. eaglet modified at 2013-1-1 + continue; + } + if (Hubble.Framework.Text.UnicodeString.Comparer(_DDXFileEnum[i].Current.Word, minWord) < 0) { minWord = _DDXFileEnum[i].Current.Word; @@ -340,6 +348,13 @@ public IEnumerable MergedWordFilePostionList //Return min word file position list; for (int i = 0; i < _DDXFileEnum.Length; i++) { + if (_DDXFileEnum[i].Current == null) + { + //DDXFile i reached end of the file. eaglet modified at 2013-1-1 + needShrink = true; + continue; + } + if (minWord == _DDXFileEnum[i].Current.Word) { result.FilePositionList.Add(new IndexFile.FilePosition(_DDXFileEnum[i].Serial,