incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/2] git commit: Fixed issue with composite atomic reader.
Date Fri, 19 Oct 2012 01:49:27 GMT
Updated Branches:
  refs/heads/lucene-4.0.0 b78135dad -> 0e14acba2


Fixed issue with composite atomic reader.


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

Branch: refs/heads/lucene-4.0.0
Commit: 0e14acba216e3aeaa9859be0f2344b41473278ae
Parents: 3df5c36
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Thu Oct 18 21:48:33 2012 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Thu Oct 18 21:48:33 2012 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/blur/utils/BlurUtil.java  |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/0e14acba/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java b/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
index 187705d..473fd09 100644
--- a/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
+++ b/src/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
@@ -69,9 +69,8 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.index.AtomicReader;
-import org.apache.lucene.index.AtomicReaderContext;
 import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.ParallelAtomicReader;
+import org.apache.lucene.index.SlowCompositeReaderWrapper;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.TermQuery;
@@ -660,11 +659,6 @@ public class BlurUtil {
   }
 
   public static AtomicReader getAtomicReader(IndexReader reader) throws IOException {
-    List<AtomicReaderContext> leaves = reader.leaves();
-    AtomicReader[] ar = new AtomicReader[leaves.size()];
-    for (int i = 0; i < ar.length; i++) {
-      ar[i] = leaves.get(i).reader();
-    }
-    return new ParallelAtomicReader(ar);
+    return SlowCompositeReaderWrapper.wrap(reader);
   }
 }


Mime
View raw message