I knew I could do that at jetty level with a servlet for instance, but the user wants to do this stuff inside solr code itself. Now that you mention the logs...that could be a solution without modifying the webapp...
thanks for the input! xavier On Fri, Apr 5, 2013 at 7:55 AM, Amit Nithian <anith...@gmail.com> wrote: > "We need to also track the size of the response (as the size in bytes of > the > whole xml response tat is streamed, with stored fields and all). I was a > bit worried cause I am wondering if a searchcomponent will actually have > access to the response bytes..." > > ==> Can't you get this from your container access logs after the fact? I > may be misunderstanding something but why wouldn't mining the Jetty/Tomcat > logs for the response size here suffice? > > Thanks! > Amit > > > On Thu, Apr 4, 2013 at 1:34 AM, xavier jmlucjav <jmluc...@gmail.com> > wrote: > > > A custom QueryResponseWriter...this makes sense, thanks Jack > > > > > > On Wed, Apr 3, 2013 at 11:21 PM, Jack Krupansky <j...@basetechnology.com > > >wrote: > > > > > The search components can see the "response" as a namedlist, but it is > > > only when SolrDispatchFIlter calls the QueryResponseWriter that XML or > > JSON > > > or whatever other format (Javabin as well) is generated from the named > > list > > > for final output in an HTTP response. > > > > > > You probably want a custom query response writer that wraps the XML > > > response writer. Then you can generate the XML and then do whatever you > > > want with it. > > > > > > The QueryResponseWriter class and <queryResponseWriter> in > > solrconfig.xml. > > > > > > -- Jack Krupansky > > > > > > -----Original Message----- From: xavier jmlucjav > > > Sent: Wednesday, April 03, 2013 4:22 PM > > > To: solr-user@lucene.apache.org > > > Subject: do SearchComponents have access to response contents > > > > > > > > > I need to implement some SearchComponent that will deal with metrics on > > the > > > response. Some things I see will be easy to get, like number of hits > for > > > instance, but I am more worried with this: > > > > > > We need to also track the size of the response (as the size in bytes of > > the > > > whole xml response tat is streamed, with stored fields and all). I was > a > > > bit worried cause I am wondering if a searchcomponent will actually > have > > > access to the response bytes... > > > > > > Can someone confirm one way or the other? We are targeting Sorl4.0 > > > > > > thanks > > > xavier > > > > > >