You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2016/12/30 15:57:07 UTC
[31/50] [abbrv] lucene-solr:jira/solr-9854: LUCENE-7605: Use
codec-specific impl of live docs when sorting.
LUCENE-7605: Use codec-specific impl of live docs when sorting.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/dc6dcdda
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/dc6dcdda
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/dc6dcdda
Branch: refs/heads/jira/solr-9854
Commit: dc6dcdda8078eb9f100fd6c66b5d488d057b019b
Parents: e4ef423
Author: Adrien Grand <jp...@gmail.com>
Authored: Wed Dec 28 20:12:02 2016 +0100
Committer: Adrien Grand <jp...@gmail.com>
Committed: Wed Dec 28 20:12:02 2016 +0100
----------------------------------------------------------------------
.../lucene/index/DocumentsWriterPerThread.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/dc6dcdda/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java b/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java
index 49d03ad..48901e5 100644
--- a/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java
+++ b/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java
@@ -33,10 +33,10 @@ import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FlushInfo;
import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.TrackingDirectoryWrapper;
+import org.apache.lucene.util.Bits;
import org.apache.lucene.util.ByteBlockPool.Allocator;
import org.apache.lucene.util.ByteBlockPool.DirectTrackingAllocator;
import org.apache.lucene.util.Counter;
-import org.apache.lucene.util.FixedBitSet;
import org.apache.lucene.util.InfoStream;
import org.apache.lucene.util.IntBlockPool;
import org.apache.lucene.util.MutableBits;
@@ -496,15 +496,15 @@ class DocumentsWriterPerThread {
return filesToDelete;
}
- private MutableBits sortLiveDocs(MutableBits bits, Sorter.DocMap sortMap) {
- assert bits != null && sortMap != null;
- FixedBitSet bitSet = new FixedBitSet(bits.length());
- for (int i = 0; i < bits.length(); i++) {
- if (bits.get(i)) {
- bitSet.set(sortMap.oldToNew(i));
+ private MutableBits sortLiveDocs(Bits liveDocs, Sorter.DocMap sortMap) throws IOException {
+ assert liveDocs != null && sortMap != null;
+ MutableBits sortedLiveDocs = codec.liveDocsFormat().newLiveDocs(liveDocs.length());
+ for (int i = 0; i < liveDocs.length(); i++) {
+ if (liveDocs.get(i) == false) {
+ sortedLiveDocs.clear(sortMap.oldToNew(i));
}
}
- return bitSet;
+ return sortedLiveDocs;
}
/**