商讯信箱
用户名: @
密  码:   注册|忘记密码
登录
个人用户经销商
您的位置:首页 > 技术频道 > 正文

LotusDomino编写Web浏览器多数据库检索程序

作者:IT168 佚名  2008-02-22
'下列循环从满足条件的记录集中读取记录并输出: For i% = 1 To collection.Count Set MatchDoc = collection.GetNthDocument(i%) Print {<br><a href="http://www.chinaitpower.com/} &SearchDB &{/AllDocument/} & MatchDoc.UniversalID" &{?OpenDocument">} Print "<b>" '如果文档包含Subject或Title,则输出Subject或Title: Set item =MatchDoc.GetFirstItem( "Subject" ) If ( item Is Nothing ) Then Set item = MatchDoc.GetFirstItem( "Title" ) End If If Not (item Is Nothing) Then Print " <b>" & item.Name & "</b>: " & item.Text End If '如果文档包含Categories,则输出Categories: Set item = MatchDoc.GetFirstItem( "Categories" ) If Not (item Is Nothing) Then Print item.Name & "</b>: " & item.Text End If '输出文档产生日期和作者: createDate = MatchDoc.Created Print "Document create date:" &createDate Print " Authors: " Forall aAuthor In MatchDoc.Authors Print aAuthor End Forall Print "</a><br>" Next Next Out: Print {</body></html>} Exit Sub EmptyQuery: Print {<b>Search query can not be empty </b>} Resume Out BadQuery: Print {<b>Query is not understandable: </b>"} & doc.Query(0) & {"} Resume Out End Sub

    在本例中使用的FTSearch搜索查询内容是一个符合 Notes 全文检索规则的字符串,搜索内容可以是一个字词或多个字词。搜索内容可以包括 ? 和 * 通配符,并且可以由! (not)、& (and)、|(or)操作符混合。所检索的数据库可以有全文索引,也可以没有全文索引。如果没有全文索引,则搜索速度会慢一些。运行本程序时,应先从浏览器中输入URL:http://homeURL/SiteSearch.NSF/SearchForm?OpenForm,然后选择欲检索的数据库并输入检索条件,单击Submit按钮,则将列出所有符合检索条件的文档。

观看专家视频讲座,了解人员协作信息,赢取免费试用软件。

1 2
【内容导航】
第1页: 第1页 第2页: 第2页
©版权所有。未经许可,不得转载。
[责任编辑:郑重]
[an error occurred while processing this directive]