Wouldn't all of your AJAX requests be logged in your web server access logs, assuming that you are using GET requests for your searches? You can parse those for analysis.
You could also probably configure Whoosh or whatever calls the search function to write a record in the database with the query, and probably the results, although probably not advisable on heavily trafficked sites or if large result sets are common.
-James
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b9943bb0-fc6c-4bff-86cc-45f1dd28c1df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You generally would store the necessary information as part of your view, or more likely as part of the form, inside the database for later retrieval.
In your scenario though, your AJAX requests should be using GET or HEAD requests, and even the search form itself should be using a GET action, allowing links to saved searches, but more importantly, capturing the submitted search terms directly in to your logs (although this may require some minor tweaking on your web server to log the extra GET parameters upon the actual form submission).
TL;DR;
Unless you plan on storing the results of the search queries, everything you need would be in your web server access logs with no changes to Django itself.
-James
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ec51a70c-c16a-471b-9b18-4915b5227f23%40googlegroups.com.