Re: Logging the click data

Vivek Pal <[email protected]> Sun, 18 Jun 2017 16:37:19 +0530
Newsgroups gmane.comp.search.xapian.devel
Message-ID <CAGxcUfwqSmujrgw2z1+i_3RkWxgYX=1Ucxr9B=yGoqTdUKWNFg@mail.gmail.com>
> [Please keep discussions on the mailing list.]

I accidentally clicked on "Reply" instead of "Reply to all" but later I did
send a separate mail to the mailing list.

> Thinking about this, the way that CGI works is you set a 'Status'
> header which changes this behaviour. So we don't actually need a
> new command, just something like:
>
> $httpheader{Status,302 Found}
> $httpheader{Location,$cgi{URL}}

Ok, got it. I was initially under the impression that we needed a new
Omegascript command to enable opening a webpage given a url.

> See http://www.oreilly.com/openbook/cgi/ch03_07.html and the
> parse_omegascript() function (in query.cc).

Thanks, I found that link very helpful. Great book on CGI programming.

> You can run omega.cgi from the command line without installing it and
> going via a web server. This is what the omegatests do, for instance.

Yeah, I was thinking about doing the same. Thanks, will try that.

> Don't do it like this; you can open a PR and note in the comment that
> it isn't ready for merge, and then we get much better tools for
> discussing the source code.

Okay, will open a PR with adding the new $qid{} command first. Although,
I was going to wait until the preprocessing script was complete and then
open a single PR for the whole logging functionality.

Thanks,
Vivek