You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by rm...@apache.org on 2010/02/25 20:19:17 UTC
svn commit: r916405 - in
/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs:
pulsing/ sep/
Author: rmuir
Date: Thu Feb 25 19:19:16 2010
New Revision: 916405
URL: http://svn.apache.org/viewvc?rev=916405&view=rev
Log:
LUCENE-2111: nocommit -> TODO for experimental codecs
Modified:
lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsReaderImpl.java
lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsWriterImpl.java
lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java
lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java
lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPostingsWriterImpl.java
lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListReader.java
lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListWriter.java
Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsReaderImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsReaderImpl.java?rev=916405&r1=916404&r2=916405&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsReaderImpl.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsReaderImpl.java Thu Feb 25 19:19:16 2010
@@ -35,7 +35,7 @@
* postings format
* @lucene.experimental */
-// nocommit -- should we switch "hasProx" higher up? and
+// TODO: -- should we switch "hasProx" higher up? and
// create two separate docs readers, one that also reads
// prox and one that doesn't?
@@ -217,7 +217,7 @@
}
}
- // nocommit -- not great that we can't always reuse
+ // TODO: -- not great that we can't always reuse
@Override
public DocsAndPositionsEnum docsAndPositions(FieldInfo field, TermState _termState, Bits skipDocs, DocsAndPositionsEnum reuse) throws IOException {
PulsingTermState termState = (PulsingTermState) _termState;
@@ -246,7 +246,7 @@
public void close() {}
PulsingDocsEnum reset(Bits skipDocs, PulsingTermState termState) {
- // nocommit -- not great we have to clone here --
+ // TODO: -- not great we have to clone here --
// merging is wasteful; TermRangeQuery too
state = (PulsingTermState) termState.clone();
this.skipDocs = skipDocs;
@@ -271,7 +271,7 @@
@Override
public int read(int[] docs, int[] freqs) {
int i=0;
- // nocommit -- ob1?
+ // TODO: -- ob1?
while(nextRead < state.docFreq) {
doc = state.docs[nextRead++];
if (skipDocs == null || !skipDocs.get(doc.docID)) {
@@ -319,7 +319,7 @@
public void close() {}
PulsingDocsAndPositionsEnum reset(Bits skipDocs, PulsingTermState termState) {
- // nocommit -- not great we have to clone here --
+ // TODO: -- not great we have to clone here --
// merging is wasteful; TermRangeQuery too
state = (PulsingTermState) termState.clone();
this.skipDocs = skipDocs;
Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsWriterImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsWriterImpl.java?rev=916405&r1=916404&r2=916405&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsWriterImpl.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/pulsing/PulsingPostingsWriterImpl.java Thu Feb 25 19:19:16 2010
@@ -55,7 +55,7 @@
// nocommit
String desc;
- // nocommit: public
+ /** @lucene.experimental */
public static class Document {
int docID;
int termDocFreq;
@@ -110,7 +110,7 @@
}
}
- // nocommit -- lazy init this? ie, if every single term
+ // TODO: -- lazy init this? ie, if every single term
// was pulsed then we never need to use this fallback?
// Fallback writer for non-pulsed terms:
final StandardPostingsWriter wrappedPostingsWriter;
@@ -144,7 +144,7 @@
pulsed = false;
}
- // nocommit -- should we NOT reuse across fields? would
+ // TODO: -- should we NOT reuse across fields? would
// be cleaner
// Currently, this instance is re-used across fields, so
@@ -211,7 +211,7 @@
} else {
currentDoc = pendingDocs[pendingDocCount++];
currentDoc.docID = docID;
- // nocommit -- need not store in doc? only used for alloc & assert
+ // TODO: -- need not store in doc? only used for alloc & assert
currentDoc.termDocFreq = termDocFreq;
if (termDocFreq > currentDoc.positions.length) {
currentDoc.reallocPositions(termDocFreq);
Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java?rev=916405&r1=916404&r2=916405&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java Thu Feb 25 19:19:16 2010
@@ -36,7 +36,7 @@
public abstract Index index() throws IOException;
- // nocommit -- can we simplify this?
+ // TODO: -- can we simplify this?
public abstract static class Index {
// nocommit
Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java?rev=916405&r1=916404&r2=916405&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPostingsReaderImpl.java Thu Feb 25 19:19:16 2010
@@ -39,7 +39,7 @@
* @lucene.experimental
*/
-// nocommit -- should we switch "hasProx" higher up? and
+// TODO: -- should we switch "hasProx" higher up? and
// create two separate docs readers, one that also reads
// prox and one that doesn't?
@@ -250,7 +250,7 @@
int freq;
long freqStart;
- // nocommit -- should we do omitTF with 2 different enum classes?
+ // TODO: -- should we do omitTF with 2 different enum classes?
private boolean omitTF;
private boolean storePayloads;
private Bits skipDocs;
@@ -262,7 +262,7 @@
private final IntIndexInput.Index freqIndex;
private final IntIndexInput.Index posIndex;
- // nocommit -- should we do hasProx with 2 different enum classes?
+ // TODO: -- should we do hasProx with 2 different enum classes?
boolean skipped;
SepSkipListReader skipper;
@@ -295,7 +295,7 @@
omitTF = fieldInfo.omitTermFreqAndPositions;
storePayloads = fieldInfo.storePayloads;
- // nocommit: can't we only do this if consumer
+ // TODO: can't we only do this if consumer
// skipped consuming the previous docs?
docIndex.set(termState.docIndex);
docIndex.seek(docReader);
@@ -361,7 +361,7 @@
@Override
public int read(int[] docs, int[] freqs) throws IOException {
- // nocommit -- switch to bulk read api in IntIndexInput
+ // TODO: -- switch to bulk read api in IntIndexInput
int i = 0;
final int length = docs.length;
while (i < length && count < docFreq) {
@@ -484,7 +484,7 @@
int freq;
long freqStart;
- // nocommit -- should we do omitTF with 2 different enum classes?
+ // TODO: -- should we do omitTF with 2 different enum classes?
private boolean omitTF;
private boolean storePayloads;
private Bits skipDocs;
@@ -529,7 +529,7 @@
this.skipDocs = skipDocs;
storePayloads = fieldInfo.storePayloads;
- // nocommit: can't we only do this if consumer
+ // TODO: can't we only do this if consumer
// skipped consuming the previous docs?
docIndex.set(termState.docIndex);
docIndex.seek(docReader);
Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPostingsWriterImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPostingsWriterImpl.java?rev=916405&r1=916404&r2=916405&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPostingsWriterImpl.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepPostingsWriterImpl.java Thu Feb 25 19:19:16 2010
@@ -93,7 +93,7 @@
state.flushedFiles.add(posFileName);
posIndex = posOut.index();
- // nocommit -- only if at least one field stores payloads?
+ // TODO: -- only if at least one field stores payloads?
final String payloadFileName = IndexFileNames.segmentFileName(state.segmentName, SepCodec.PAYLOAD_EXTENSION);
state.flushedFiles.add(payloadFileName);
payloadOut = state.directory.createOutput(payloadFileName);
@@ -112,7 +112,7 @@
totalNumDocs = state.numDocs;
- // nocommit -- abstraction violation
+ // TODO: -- abstraction violation
skipListWriter = new SepSkipListWriter(state.skipInterval,
state.maxSkipLevels,
state.numDocs,
@@ -127,7 +127,7 @@
public void start(IndexOutput termsOut) throws IOException {
this.termsOut = termsOut;
Codec.writeHeader(termsOut, CODEC, VERSION_CURRENT);
- // nocommit -- just ask skipper to "start" here
+ // TODO: -- just ask skipper to "start" here
termsOut.writeInt(skipInterval); // write skipInterval
termsOut.writeInt(maxSkipLevels); // write maxSkipLevels
}
@@ -147,7 +147,7 @@
skipListWriter.resetSkip(docIndex, freqIndex, posIndex);
}
- // nocommit -- should we NOT reuse across fields? would
+ // TODO: -- should we NOT reuse across fields? would
// be cleaner
// Currently, this instance is re-used across fields, so
@@ -177,7 +177,7 @@
}
if ((++df % skipInterval) == 0) {
- // nocommit -- awkward we have to make these two
+ // TODO: -- awkward we have to make these two
// separate calls to skipper
skipListWriter.setSkipData(lastDocID, storePayloads, lastPayloadLength);
skipListWriter.bufferSkip(df);
@@ -259,13 +259,13 @@
long skipPos = skipOut.getFilePointer();
- // nocommit -- wasteful we are counting this in two places?
+ // TODO: -- wasteful we are counting this in two places?
assert docCount == df;
if (Codec.DEBUG) {
System.out.println("dw.finishTerm termsFP=" + termsOut.getFilePointer() + " df=" + df + " skipPos=" + skipPos);
}
- // nocommit -- only do this if once (consolidate the
+ // TODO: -- only do this if once (consolidate the
// conditional things that are written)
if (!omitTF) {
freqIndex.write(termsOut, isIndexTerm);
Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListReader.java?rev=916405&r1=916404&r2=916405&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListReader.java Thu Feb 25 19:19:16 2010
@@ -42,7 +42,7 @@
private final IntIndexInput.Index lastFreqIndex;
private final IntIndexInput.Index lastDocIndex;
- // nocommit -- make private again
+ // TODO: -- make private again
final IntIndexInput.Index lastPosIndex;
private long lastPayloadPointer;
Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListWriter.java?rev=916405&r1=916404&r2=916405&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListWriter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/sep/SepSkipListWriter.java Thu Feb 25 19:19:16 2010
@@ -24,7 +24,7 @@
import org.apache.lucene.index.codecs.Codec;
import org.apache.lucene.index.codecs.MultiLevelSkipListWriter;
-// nocommit -- skip data should somehow be more local to the
+// TODO: -- skip data should somehow be more local to the
// particular stream (doc, freq, pos, payload)
/**
@@ -44,9 +44,9 @@
private IntIndexOutput freqOutput;
private IntIndexOutput docOutput;
- // nocommit -- private again
+ // TODO: -- private again
IntIndexOutput posOutput;
- // nocommit -- private again
+ // TODO: -- private again
IndexOutput payloadOutput;
private int curDoc;
@@ -69,7 +69,7 @@
lastSkipDoc = new int[numberOfSkipLevels];
lastSkipPayloadLength = new int[numberOfSkipLevels];
- // nocommit -- also cutover normal IndexOutput to use getIndex()?
+ // TODO: -- also cutover normal IndexOutput to use getIndex()?
lastSkipPayloadPointer = new long[numberOfSkipLevels];
freqIndex = new IntIndexOutput.Index[numberOfSkipLevels];