I'm using Solr and wish to be able to log queries/tokens to a database for analytics for both marketing and suggested search functionality.
I'm guessing that a Lucene filter would be a good way of doing this, maybe putting a filter in the query filter chain for a given field type which logs to a specified database. I'm wondering the best way to do this to minimize the impact on Solr response times.
If anybody has done this in the past and is willing to share their solution, that would be fantastic.