incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [18/45] git commit: Fixed BLUR-226
Date Sat, 28 Sep 2013 02:12:04 GMT
Fixed BLUR-226


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/a30a1da5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/a30a1da5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/a30a1da5

Branch: refs/heads/apache-blur-0.2
Commit: a30a1da56ff29a567084fd0ffb11c3c76101ebc1
Parents: 0066804
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sun Sep 15 21:30:43 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sun Sep 15 21:30:43 2013 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/blur/manager/IndexManager.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/a30a1da5/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java b/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
index 45b62d1..98c0bcf 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
@@ -723,13 +723,15 @@ public class IndexManager {
     AtomicReader areader = BlurUtil.getAtomicReader(reader);
     Terms termsAll = areader.terms(term.field());
     TermsEnum termEnum = termsAll.iterator(null);
-    BytesRef currentTermText;
-    while ((currentTermText = termEnum.next()) != null) {
+    termEnum.seekCeil(term.bytes());
+
+    BytesRef currentTermText = termEnum.term();
+    do {
       terms.add(currentTermText.utf8ToString());
       if (terms.size() >= size) {
         return terms;
       }
-    }
+    } while ((currentTermText = termEnum.next()) != null);
     return terms;
   }
 


Mime
View raw message