Solr
  1. Solr
  2. SOLR-746

Make it possible to omit responseheader

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: search
    • Labels:
      None

      Description

      In a lot of cases we do not actually need the data included in the
      header.So we just waste bandwidth, processing to write and read this .

      And there are requests where the responses are quite small and too frequent (say for auto-suggest feature) where this overhead is unnecessary

      we should add a request parameter omitHeader=true|false . Default
      should be false . If it is true let us not send the header itself

      http://markmail.org/message/rcobnn4g2qyzygmp

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        The response header is currently set in SolrCore#execute and SolrCore#setResponseHeaderValues. Are there any objections to move this to RequestHandlerBase#handleRequest? That way individual request handlers can suppress headers if so configured.

        Show
        Shalin Shekhar Mangar added a comment - The response header is currently set in SolrCore#execute and SolrCore#setResponseHeaderValues. Are there any objections to move this to RequestHandlerBase#handleRequest? That way individual request handlers can suppress headers if so configured.
        Hide
        Hoss Man added a comment -

        that wouldn't be back compatible for existing users who have written their own handlers.

        the simplest approach would probably be leave SolrCore alone and just modify the ResponseWriters where we think this would be relevant (json and XML i'm guessing) to not bother outputting the responseHeader if a certain param is set.

        (the time spent in setResponseHeaderValues should be negligable)

        Show
        Hoss Man added a comment - that wouldn't be back compatible for existing users who have written their own handlers. the simplest approach would probably be leave SolrCore alone and just modify the ResponseWriters where we think this would be relevant (json and XML i'm guessing) to not bother outputting the responseHeader if a certain param is set. (the time spent in setResponseHeaderValues should be negligable)
        Hide
        Noble Paul added a comment -

        added the code to JSON/XML/BINARY response writers to remove the header

        NamedList now has an extra method remove(String name)

        Show
        Noble Paul added a comment - added the code to JSON/XML/BINARY response writers to remove the header NamedList now has an extra method remove(String name)
        Hide
        Shalin Shekhar Mangar added a comment -

        Committed revision 706577.

        Thanks Hoss and Noble!

        Show
        Shalin Shekhar Mangar added a comment - Committed revision 706577. Thanks Hoss and Noble!
        Hide
        Grant Ingersoll added a comment -

        Bulk close for Solr 1.4

        Show
        Grant Ingersoll added a comment - Bulk close for Solr 1.4

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Noble Paul
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development