Logging the click data

Vivek Pal vivekpal.dtu at gmail.com
Sat Jun 3 22:08:07 BST 2017


Hi,

I spent this week mostly understanding how the existing templates work and
setting up Omega CGI on my system to have a better grasp over how things
actually look like when using different templates.

This helped me look at things associated with logging the click data from
a better perspective. As already documented on the project's wiki page,
we need the following fields in separater columns:

1. ID: some identifier for each entry
2. QUERY: text of the query
3. URLs: list of the URLs of the documents displayed on the result page
4. CLICKS: list of clicks where each element is the number of times the
corresponditng URL was clicked

It seems more natural to me to implement a secondary log command and trigger
it everytime a new query is entered into the query template. It would create
a log file with the above columns/fields i.e. a unique identifier for each
log entry, entered query text, list of documents URLs displayed, a list
of the number of times the corresponding URL was clicked (all the elements
in this list will be initialised as 0 as clicks haven't occurred yet.)

Once we have the log file, all we need to do is update the fourth column
with
click information whenever a click happens by looking for the correct entry
in the file (e.g. by matching the query text) and update the list in the
fourth column accordingly.

Does this entire idea sounds workable?

I'm not entirely sure how to achieve the last part i.e. updating the log
file
with click information but as discussed earlier, a log template can helpful
here. As of now, I think it could be implemented like topterms template
(i.e.
without any structure to be displayed) where we'd jsut invoke some
Omegascript
commands to do the update. Another question -- we'd need to trigger this
template whenever a click happens, so is it possible to have such a
behaviour
from within query template through some existing Omegascript commands?

Thanks,
Vivek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20170604/42477ce6/attachment.html>


More information about the Xapian-devel mailing list