make toString() output slightly more logical (compressed only refers to stored fields)

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150574 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2004-10-06 20:03:25 +00:00
parent 01e3ab0d13
commit 251d0f5a54
1 changed files with 6 additions and 7 deletions

View File

@ -542,8 +542,13 @@ public final class Field implements Serializable {
/** Prints a Field for human consumption. */ /** Prints a Field for human consumption. */
public final String toString() { public final String toString() {
StringBuffer result = new StringBuffer(); StringBuffer result = new StringBuffer();
if (isStored) if (isStored) {
result.append("stored"); result.append("stored");
if (isCompressed)
result.append("/compressed");
else
result.append("/uncompressed");
}
if (isIndexed) { if (isIndexed) {
if (result.length() > 0) if (result.length() > 0)
result.append(","); result.append(",");
@ -575,12 +580,6 @@ public final class Field implements Serializable {
result.append("binary"); result.append("binary");
} }
if (isCompressed) {
if (result.length() > 0)
result.append(",");
result.append("compressed");
}
result.append('<'); result.append('<');
result.append(name); result.append(name);
result.append(':'); result.append(':');