Hi,
 
I've noticed that in SOLR-7484 Solr part of http request was moved to 
SolrHttpCall. So there is no way to handle
SolrQueryRequest and SolrQueryResponse in SolrDispatchFilter.
 
Internal requet logging is SolrCore.execute(SolrRequestHandler, 
SolrQueryRequest, SolrQueryResponse)
 
Is there is way to handle SOLR request/response to make custom log in SolrCloud 
environment.
 
thank you, m.


Hi,

I would like to ask how to implement search audit logging. I've implemented 
some idea but I would like to ask if there is better approach to do this.

Requirement is to log username, search time, all request parameters (q, fq, 
etc.), response data (count, etc) and important thing is to log all errors.

As I need it only for search requests I implemented custom SearchHandler with 
something like:

public class AuditSearchHandler extends SearchHandler {
    
    @Override
    public void handleRequest(SolrQueryRequest req, SolrQueryResponse rsp) {
        try {
            super.handleRequest(req, rsp);
        } finally {
            doAuditLog(req, rsp);
        }
    }
}

Custom SearchComponent is not option, because it can't handle all errors.

I read also 
/http://lucene.472066.n3.nabble.com/Solr-request-response-lifecycle-and-logging-full-response-time-td4006044.html/[1]
 and they mentioned custom Servlet Filter, but I didn't find example how to 
implement Servlet Filter to SOLR in proper way. If it's ok to edit web.xml

thanks for suggestions, m.




--------
[1] 
http://lucene.472066.n3.nabble.com/Solr-request-response-lifecycle-and-logging-full-response-time-td4006044.html

Reply via email to