Re: Logging the click data

Vivek Pal <[email protected]> Wed, 14 Jun 2017 04:47:38 +0530
Newsgroups gmane.comp.search.xapian.devel
Message-ID <CAGxcUfxCjY8wCx5_ASbUAP7eQT0LPKuHic35Rgc+emC=7-k4oQ@mail.gmail.com>
Hi James,

I've completed the first step of logging the click data i.e. logging
separate entries for each executed search from the query template.
More on that progress here [1].

Now for the next step, i.e. logging the query IDs and click URL on each
click event, as planned, I created a new template which has another log
command [2]. To redirect to the clicklog template, we could add an onClick
event inside the <a> tag in line 109 in the query template [3] which calls
an external javascript function something like this one [4] to redirect to
the clicklog template. But, I can't see how we would pass $query and the
clicked doc $id to the template using that function. We want to be able
to do that in order to log them using the clicklog template. How do you
suggest I go about doing this?

Thanks,
Vivek

[1]
https://trac.xapian.org/wiki/GSoC2017/LetorClickstream/Journal#CodingWeek2:June10June16
[2] https://gist.github.com/ivmarkp/374fc8781d3789b0522713a79416edc8
[3]
https://github.com/xapian/xapian/blob/master/xapian-applications/omega/templates/query#L109