From 9c0c4a162147a38a989a570cc6c71bd6d9a02dc2 Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Tue, 21 Oct 2008 11:21:26 +0000 Subject: [PATCH] SOLR-746 -- Added "omitHeader" request parameter to omit the header from the response git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@706577 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ src/java/org/apache/solr/common/params/CommonParams.java | 5 ++++- src/java/org/apache/solr/common/util/NamedList.java | 6 ++++++ src/java/org/apache/solr/request/BinaryResponseWriter.java | 3 +++ src/java/org/apache/solr/request/JSONResponseWriter.java | 5 ++++- src/java/org/apache/solr/request/XMLWriter.java | 2 ++ 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c69f90014e9..2876593c000 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -67,6 +67,9 @@ New Features as well as configuration replication and exposes detailed statistics and progress information on the Admin page. Works on all platforms. (Noble Paul, yonik, Akshay Ukey, shalin) +10. SOLR-746: Added "omitHeader" request parameter to omit the header from the response. + (Noble Paul via shalin) + Optimizations ---------------------- 1. SOLR-374: Use IndexReader.reopen to save resources by re-using parts of the diff --git a/src/java/org/apache/solr/common/params/CommonParams.java b/src/java/org/apache/solr/common/params/CommonParams.java index ad092356c04..4f33c4d45d8 100755 --- a/src/java/org/apache/solr/common/params/CommonParams.java +++ b/src/java/org/apache/solr/common/params/CommonParams.java @@ -89,7 +89,10 @@ public interface CommonParams { /** include the parameters in the header **/ public static final String HEADER_ECHO_PARAMS = "echoParams"; - + + /** include header in the response */ + public static final String OMIT_HEADER = "omitHeader"; + /** valid values for: echoParams */ public enum EchoParamStyle { EXPLICIT, diff --git a/src/java/org/apache/solr/common/util/NamedList.java b/src/java/org/apache/solr/common/util/NamedList.java index a918fd8e41b..4439f8cf326 100644 --- a/src/java/org/apache/solr/common/util/NamedList.java +++ b/src/java/org/apache/solr/common/util/NamedList.java @@ -287,4 +287,10 @@ public class NamedList implements Cloneable, Serializable, Iterable