全文检索输出统计表格
2015-03-24 16:16
155 查看
Sub Initialize On Error GoTo errhandle Dim ss As New NotesSession Dim curdb As NotesDatabase Dim docs As NotesDocumentCollection Dim tdoc As NotesDocument Dim searchStr As String Dim sum1 As Long Dim showtabel As String sum1=0 Set curdb=ss.Currentdatabase Set docct=ss.Documentcontext sDate=docct.fldSdate(0) eDate=docct.fldEdate(0) 'searchstr={Form="Newfile" & delflag="" &Postflag="0"} 'searchstr="Form='Newfile'&delflag=''&Postflag='0'& PostTime> @TextToTime('" + sDate+"') & PostTime < @TextToTime('" + eDate+"')" 'searchstr="[PostTime] >=" +sDate + " and [PostTime] <= " +eDate+" and [Subject] contains 2013" searchstr="[PostTime] >=" +sDate + " and [PostTime] <= " +eDate ' Set docs=curdb.Search(searchstr, nothing, 0) showtabel={<html><table border="1" bordercolor="#000000" cellspacing="0" cellpadding="2" style="border-collapse:collapse;" width="100%"><tr ><td width="40%" align="center">标题 </td><td width="10%" align="center">发布人</td>} showtabel=showtabel + {<td width="15%" align="center">部门</td><td width="20%" align="center">发布日期</td> <td width="15%" align="center">点击次数</td></tr>} If curdb.Isftindexed Then Set docs=curdb.Ftsearch(searchstr, 0,FT_DATECREATED_DES) If (docs.Count) >0 Then Set tdoc=docs.Getfirstdocument() While(Not tdoc Is Nothing) showtabel=showtabel +{<tr><td >} +tdoc.Subject(0)+"</td><td>" +tdoc.AddName(0)+"</td><td>" +tdoc.deptname(0)+"</td><td>" +CStr(tdoc.PostTime(0))+"</td><td>" +tdoc.ClickNum(0)+"</td></tr>" sum1=sum1+CInt(tdoc.ClickNum(0)) Set tdoc=docs.Getnextdocument(tdoc) Wend End If Else Print "this database is not ftindex" End If showtabel=showtabel+"<tr><td colSpan='5'>"+"合计"+CStr(docs.Count)+"篇,点击次数合计"+CStr(sum1)+"次</td>" showtabel=showtabel+ "</table><html>" Print showtabel Exit sub errhandle: Print CStr(Error) + CStr(Erl) End Sub
相关文章推荐
- oracle中给表格设置全文检索
- RavenDb进行全文检索实现及数据统计
- PHP任意位数的大整数n统计n中各个数字出现的次数,并将结果以表格形式输出
- 编程模板-R语言脚本写作:最简单的统计与绘图,包安装、命令行参数解析、文件读取、表格和矢量图输出
- HDU 1277 全文检索
- Lucene 全文检索实践(5) 参考指数 : 3
- 统计并输出英语短文中单词出现的次数
- 配置SqlServer2000的全文检索功能
- 织梦DedeCMS v5.7全文检索使用说明(sphinx)
- strom-1.1.0模拟单词统计功能,Spout编写,Bolt编写,TopologyDriver编写,本地模式运行,集群模式运行,集群模式下看输出结果
- SQL中的全文检索 (转)
- PAIP.获取RSS全文输出.txt
- oracle 全文检索实践
- 6.9.编程计算e的近似值。直到最后一项的绝对值小于0.001时为止,输出e的值并统计累加的项数。
- 根据传入的recordset对象实例,按表格输出内容子过程
- 全文检索 lucene 4.7以上的版本只支持jdk1.7以上的 不支持jdk1.6版本
- Lucene实践(一):全文检索的基本原理
- 中兴机试:统计字符串中字符出现的频数并按从大到小输出
- moss2007配置全文检索
- 用array_count_values统计一篇英文文档中每个单词的出现次数,结果用表格展示出来