]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/dictionary/engine/Index.java
Attempt to fix issue #49.
[Dictionary.git] / src / com / hughes / android / dictionary / engine / Index.java
index 93dd34bb02d4e9fd21feaf0cc4e6ed9d8ad231fc..069cca798219be68e046be0bccd0115843c6dd92 100644 (file)
@@ -13,7 +13,7 @@
 // limitations under the License.
 
 /**
- * 
+ *
  */
 
 package com.hughes.android.dictionary.engine;
@@ -137,7 +137,7 @@ public final class Index implements RAFSerializable<Index> {
         }
         sortedIndexEntries = CachingList.create(
                 RAFList.create(raf, indexEntrySerializer, raf.getFilePointer(),
-                               dict.dictFileVersion), CACHE_SIZE);
+                               dict.dictFileVersion, dict.dictInfo + " idx " + languageCode + ": "), CACHE_SIZE);
         if (dict.dictFileVersion >= 7) {
             int count = StringUtil.readVarInt(raf);
             stoplist = new HashSet<String>(count);
@@ -244,7 +244,8 @@ public final class Index implements RAFSerializable<Index> {
             } else if (index.dict.dictFileVersion >= 6) {
                 this.htmlEntries = CachingList.create(
                         RAFList.create((RandomAccessFile)raf, index.dict.htmlEntryIndexSerializer,
-                                ((RandomAccessFile)raf).getFilePointer(), index.dict.dictFileVersion), 1);
+                                ((RandomAccessFile)raf).getFilePointer(), index.dict.dictFileVersion,
+                                index.dict.dictInfo + " htmlEntries: "), 1);
             } else {
                 this.htmlEntries = Collections.emptyList();
             }
@@ -309,7 +310,7 @@ public final class Index implements RAFSerializable<Index> {
             }
             final IndexEntry midEntry = sortedIndexEntries.get(mid);
 
-            int comp = NormalizeComparator.compareWithoutLeadingDash(token, midEntry.normalizedToken(), sortCollator, dict.dictFileVersion);
+            int comp = NormalizeComparator.compareWithoutDash(token, midEntry.normalizedToken(), sortCollator, dict.dictFileVersion);
             if (comp == 0)
                 comp = sortCollator.compare(token, midEntry.normalizedToken());
             if (comp == 0) {