From 8609b1d2f8cf17576d8234209d73c1b037cebf9f Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Sun, 16 Jun 2013 14:40:02 +0000 Subject: [PATCH] LUCENE-3069: add nocommit/TODO git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3069@1493516 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/lucene/codecs/temp/TempBlockTermsWriter.java | 8 ++++++++ .../org/apache/lucene/codecs/temp/TempPostingsWriter.java | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/lucene/core/src/java/org/apache/lucene/codecs/temp/TempBlockTermsWriter.java b/lucene/core/src/java/org/apache/lucene/codecs/temp/TempBlockTermsWriter.java index b3ca2281bea..be724f46ce2 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/temp/TempBlockTermsWriter.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/temp/TempBlockTermsWriter.java @@ -917,6 +917,14 @@ public class TempBlockTermsWriter extends FieldsConsumer { statsWriter.writeVLong(term.stats.totalTermFreq - term.stats.docFreq); } + // TODO: now that terms dict "sees" these longs, + // we can explore better column-stride encodings + // to encode all long[0]s for this block at + // once, all long[1]s, etc., e.g. using + // Simple64. Alternatively, we could interleave + // stats + meta ... no reason to have them + // separate anymore: + // Write term meta data for (int pos = 0; pos < size; pos++) { assert term.longs[pos] >= 0; diff --git a/lucene/core/src/java/org/apache/lucene/codecs/temp/TempPostingsWriter.java b/lucene/core/src/java/org/apache/lucene/codecs/temp/TempPostingsWriter.java index 9b2af7a75b7..8b5ce68de71 100644 --- a/lucene/core/src/java/org/apache/lucene/codecs/temp/TempPostingsWriter.java +++ b/lucene/core/src/java/org/apache/lucene/codecs/temp/TempPostingsWriter.java @@ -195,6 +195,8 @@ public final class TempPostingsWriter extends TempPostingsWriterBase { termsOut.writeVInt(BLOCK_SIZE); } + // nocommit better name? + @Override public void setField(FieldInfo fieldInfo) { IndexOptions indexOptions = fieldInfo.getIndexOptions(); @@ -356,6 +358,8 @@ public final class TempPostingsWriter extends TempPostingsWriterBase { } } + // nocommit explain about the "don't care" values + /** Called when we are done adding docs to this term */ @Override public void finishTerm(long[] longs, DataOutput out, TermStats stats) throws IOException {