From 251d0f5a54f1666d751d3b0b823cafa6e5bd1266 Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Wed, 6 Oct 2004 20:03:25 +0000 Subject: [PATCH] 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 --- src/java/org/apache/lucene/document/Field.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/java/org/apache/lucene/document/Field.java b/src/java/org/apache/lucene/document/Field.java index 6cd10e6b324..d14cc24eee5 100644 --- a/src/java/org/apache/lucene/document/Field.java +++ b/src/java/org/apache/lucene/document/Field.java @@ -542,8 +542,13 @@ public final class Field implements Serializable { /** Prints a Field for human consumption. */ public final String toString() { StringBuffer result = new StringBuffer(); - if (isStored) + if (isStored) { result.append("stored"); + if (isCompressed) + result.append("/compressed"); + else + result.append("/uncompressed"); + } if (isIndexed) { if (result.length() > 0) result.append(","); @@ -575,12 +580,6 @@ public final class Field implements Serializable { result.append("binary"); } - if (isCompressed) { - if (result.length() > 0) - result.append(","); - result.append("compressed"); - } - result.append('<'); result.append(name); result.append(':');