When a search query triggers a Xapian exception, log what the query was.