whitespace/better names

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/realtime_search@1097523 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2011-04-28 16:03:30 +00:00
parent 1a1060611c
commit 870f7e005e
2 changed files with 14 additions and 14 deletions

View File

@ -393,7 +393,7 @@ public class IndexWriter implements Closeable {
doAfterFlush();
}
}
if(anySegmentFlushed) {
if (anySegmentFlushed) {
maybeMerge();
}
if (infoStream != null) {
@ -1360,16 +1360,16 @@ public class IndexWriter implements Closeable {
ensureOpen();
try {
boolean success = false;
boolean maybeMerge = false;
boolean anySegmentFlushed = false;
try {
maybeMerge = docWriter.updateDocument(doc, analyzer, term);
anySegmentFlushed = docWriter.updateDocument(doc, analyzer, term);
success = true;
} finally {
if (!success && infoStream != null)
message("hit exception updating document");
}
if (maybeMerge) {
if (anySegmentFlushed) {
maybeMerge();
}
} catch (OutOfMemoryError oom) {
@ -2612,11 +2612,11 @@ public class IndexWriter implements Closeable {
message(" start flush: applyAllDeletes=" + applyAllDeletes);
message(" index before flush " + segString());
}
final boolean maybeMerge;
final boolean anySegmentFlushed;
synchronized (fullFlushLock) {
try {
maybeMerge = docWriter.flushAllThreads();
anySegmentFlushed = docWriter.flushAllThreads();
success = true;
} finally {
docWriter.finishFullFlush(success);
@ -2626,12 +2626,12 @@ public class IndexWriter implements Closeable {
synchronized(this) {
maybeApplyDeletes(applyAllDeletes);
doAfterFlush();
if (!maybeMerge) {
if (!anySegmentFlushed) {
// flushCount is incremented in flushAllThreads
flushCount.incrementAndGet();
}
success = true;
return maybeMerge;
return anySegmentFlushed;
}
} catch (OutOfMemoryError oom) {
handleOOM(oom, "doFlush");

View File

@ -71,13 +71,13 @@ final class TermVectorsTermsWriterPerField extends TermsHashConsumerPerField {
if (doVectors) {
termsWriter.hasVectors = true;
if (termsHashPerField.bytesHash.size() != 0) {
// Only necessary if previous doc hit a
// non-aborting exception while writing vectors in
// this field:
termsHashPerField.reset();
}
if (termsHashPerField.bytesHash.size() != 0) {
// Only necessary if previous doc hit a
// non-aborting exception while writing vectors in
// this field:
termsHashPerField.reset();
}
}
// TODO: only if needed for performance
//perThread.postingsCount = 0;