Source: site.view [edit]
Function name: readNewsIndex
Arguments:
Description:
Page type: snippet
Render function:  
Module: global

Page source:

   var reader = Wub_ReadLuceneIndex("resumes");
   var docs = Wub_LuceneSearch(reader, "num", queryString, 20);
   Wub_CloseLuceneIndex(reader);

   var i = 0;
   var sz = (docs.size() ? 0);

   while (i < sz) do
      var d = [. .];
      d["id"] := docs.get(i).getField("id").stringValue();
      d["name"] := docs.get(i).getField("name").stringValue();
      d["headline"] := docs.get(i).getField("headline").stringValue();
      d["industry"] := docs.get(i).getField("industry").stringValue();
      d["salary"] := docs.get(i).getField("salary").stringValue();

      res = res + [d];
      i = i + 1
   end;
   res;