Source: site.view [edit]
Function name: cmdRecordVote
Arguments: index,personId,skill
Description: Adds a vote to index
Page type: webl
Render function:  
Module: skillsrank

Page source:

   var writer = Wub_NewLuceneIndex("vote" + index, false, "standard");

   var doc = Wub_NewLuceneDocument();
   var ok = true;

   ok = ok and Wub_AddLuceneField(doc, "id", personId, true, true);
   ok = ok and Wub_AddLuceneField(doc, "skill", skill, true, true);

   ok = ok and Wub_AddLuceneDocument(writer, doc);

   var optimize = true;

   if optimize == true then
      ok = ok and Wub_OptimizeLucene(writer);
   end;

   ok = ok and Wub_CloseLuceneIndex(writer);

"";