LUCENE-2596: merging from 3x

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@988517 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shai Erera 2010-08-24 12:57:35 +00:00
parent 728ad83af8
commit 8a0d3646dc
4 changed files with 20 additions and 3 deletions

View File

@ -1555,7 +1555,6 @@ public class IndexWriter implements Closeable {
private void messageState() { private void messageState() {
message("\ndir=" + directory + "\n" + message("\ndir=" + directory + "\n" +
"mergePolicy=" + mergePolicy + "\n" +
"index=" + segString() + "\n" + "index=" + segString() + "\n" +
"version=" + Constants.LUCENE_VERSION + "\n" + "version=" + Constants.LUCENE_VERSION + "\n" +
config.toString()); config.toString());

View File

@ -601,7 +601,7 @@ public final class IndexWriterConfig implements Cloneable {
return this; return this;
} }
/** @see #setReaderTermsIndexDivisor() */ /** @see #setReaderTermsIndexDivisor(int) */
public int getReaderTermsIndexDivisor() { public int getReaderTermsIndexDivisor() {
return readerTermsIndexDivisor; return readerTermsIndexDivisor;
} }
@ -610,7 +610,7 @@ public final class IndexWriterConfig implements Cloneable {
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("matchVersion=").append(matchVersion).append("\n"); sb.append("matchVersion=").append(matchVersion).append("\n");
sb.append("analyzer=").append(analyzer.getClass().getName()).append("\n"); sb.append("analyzer=").append(analyzer == null ? "null" : analyzer.getClass().getName()).append("\n");
sb.append("delPolicy=").append(delPolicy.getClass().getName()).append("\n"); sb.append("delPolicy=").append(delPolicy.getClass().getName()).append("\n");
sb.append("commit=").append(commit == null ? "null" : commit.getClass().getName()).append("\n"); sb.append("commit=").append(commit == null ? "null" : commit.getClass().getName()).append("\n");
sb.append("openMode=").append(openMode).append("\n"); sb.append("openMode=").append(openMode).append("\n");

View File

@ -485,4 +485,18 @@ public abstract class LogMergePolicy extends MergePolicy {
return maxMergeDocs; return maxMergeDocs;
} }
@Override
public String toString() {
StringBuilder sb = new StringBuilder("[");
sb.append("minMergeSize=").append(minMergeSize).append(", ");
sb.append("mergeFactor=").append(mergeFactor).append(", ");
sb.append("maxMergeSize=").append(maxMergeSize).append(", ");
sb.append("calibrateSizeByDeletes=").append(calibrateSizeByDeletes).append(", ");
sb.append("maxMergeDocs=").append(maxMergeDocs).append(", ");
sb.append("useCompoundFile=").append(useCompoundFile).append(", ");
sb.append("useCompoundDocStore=").append(useCompoundDocStore);
sb.append("]");
return sb.toString();
}
} }

View File

@ -75,4 +75,8 @@ public final class NoMergePolicy extends MergePolicy {
@Override @Override
public void setIndexWriter(IndexWriter writer) {} public void setIndexWriter(IndexWriter writer) {}
@Override
public String toString() {
return "NoMergePolicy";
}
} }