<div dir="ltr"><div>Hi,</div><div><br></div><div>I spent this week mostly understanding how the existing templates work and</div><div>setting up Omega CGI on my system to have a better grasp over how things</div><div>actually look like when using different templates.</div><div><br></div><div>This helped me look at things associated with logging the click data from</div><div>a better perspective. As already documented on the project's wiki page,</div><div>we need the following fields in separater columns:</div><div><br></div><div>1. ID: some identifier for each entry</div><div>2. QUERY: text of the query</div><div>3. URLs: list of the URLs of the documents displayed on the result page</div><div>4. CLICKS: list of clicks where each element is the number of times the</div><div>corresponditng URL was clicked</div><div><br></div><div>It seems more natural to me to implement a secondary log command and trigger</div><div>it everytime a new query is entered into the query template. It would create</div><div>a log file with the above columns/fields i.e. a unique identifier for each</div><div>log entry, entered query text, list of documents URLs displayed, a list</div><div>of the number of times the corresponding URL was clicked (all the elements</div><div>in this list will be initialised as 0 as clicks haven't occurred yet.)</div><div><br></div><div>Once we have the log file, all we need to do is update the fourth column with</div><div>click information whenever a click happens by looking for the correct entry</div><div>in the file (e.g. by matching the query text) and update the list in the</div><div>fourth column accordingly.</div><div><br></div><div>Does this entire idea sounds workable?</div><div><br></div><div>I'm not entirely sure how to achieve the last part i.e. updating the log file</div><div>with click information but as discussed earlier, a log template can helpful</div><div>here. As of now, I think it could be implemented like topterms template (i.e.</div><div>without any structure to be displayed) where we'd jsut invoke some Omegascript</div><div>commands to do the update. Another question -- we'd need to trigger this</div><div>template whenever a click happens, so is it possible to have such a behaviour</div><div>from within query template through some existing Omegascript commands?</div><div><br></div><div>Thanks,</div><div>Vivek</div></div>