diff --git a/solr/core/src/java/org/apache/solr/response/JSONResponseWriter.java b/solr/core/src/java/org/apache/solr/response/JSONResponseWriter.java index ab2cfb8ab27..847c16d724f 100644 --- a/solr/core/src/java/org/apache/solr/response/JSONResponseWriter.java +++ b/solr/core/src/java/org/apache/solr/response/JSONResponseWriter.java @@ -92,6 +92,7 @@ class JSONWriter extends TextResponseWriter { if(wrapperFunction!=null) { writer.write(')'); } + if (doIndent) writer.write('\n'); // ending with a newline looks much better from the command line } protected void writeKey(String fname, boolean needsEscaping) throws IOException { diff --git a/solr/example/solr/conf/solrconfig.xml b/solr/example/solr/conf/solrconfig.xml index ff7c0711755..669233ddf6e 100755 --- a/solr/example/solr/conf/solrconfig.xml +++ b/solr/example/solr/conf/solrconfig.xml @@ -933,9 +933,13 @@ - + + + json + true + + +