请教一个FTSearch的写法

happy243 2004-08-17 05:37:45
要查找收件箱中所有日期大于2004-08-01
并且主题为'aaa*'或'bbb*'的
...全文
152 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
虎头是我 2004-08-18
  • 打赏
  • 举报
回复
反驳楼上的,

楼主的命题明明是:并且主题为'aaa*'或'bbb*'的
“为”的意思是等于,而不是包含

而且,楼主的意思,*是被搜索内容,而不应该成为通配符号,

所以,如果按楼上的意思,搜索主题以aaa*开头的文档,也应该是:

key = {(@Left(Subject;4)="aaa*"|@Left(Subject;4)="bbb*") & @Created > [2004-08-01]}
Set collection = db.FTSearch( key , 0)

而我真正的错误是@Created ,而不应该是@Create ,楼上的却没有发现


ibm123 2004-08-17
  • 打赏
  • 举报
回复
纠正楼上的:

key = {(@Matches(Subject;"aaa*")|@Matches(Subject;"bbb*")) & @Create > [2004-08-01]}
Set collection = db.FTSearch( key , 0)
虎头是我 2004-08-17
  • 打赏
  • 举报
回复
这是随机帮助的例子:

Examples: FTSearch method

1. This script searches the current database for the phrase "printing press." Every document containing the phrase is placed into the collection.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Set db = session.CurrentDatabase
Set collection = db.FTSearch( """printing press""", 0 _
FT_SCORES, FT_STEMS)
2. This script creates a newsletter of the top ten documents in the INVNTION.NSF database that contain the word "vaccine," and mails it to Joann Smera. If the database isn't full-text indexed, the script does nothing.
Dim db As New NotesDatabase( "Berlin", "invntion.nsf" )
Dim collection As NotesDocumentCollection
Dim newsletter As NotesNewsletter
Dim doc As NotesDocument
If db.IsFTIndexed Then
Set collection = db.FTSearch( "vaccine", 10 )
Set newsletter = New NotesNewsletter( collection )
Set doc = newsletter.FormatMsgWithDoclinks( db )
doc.Form = "Memo"
doc.Subject = "Here's the newsletter you requested."
Call doc.Send( False, """Joann Smera""" )
End If

你的实例:

key = {(form = "aaa*"|form = "bbb*") & @Create > [2004-08-01]}
Set collection = db.FTSearch( key)

提问前最好先看帮助,

535

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 Exchange Server
社区管理员
  • 消息协作社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧