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