我需要找出是否在Domino数据库上更新了FT索引。如果它没有更新我想显示有多少文件未编入索引,可能吗?
答案 0 :(得分:2)
您可以使用数据库方法search(String formula, DateTime dt, int max)
搜索在最后一个索引时间戳之后创建或修改的文档,然后计算找到的文档数:
DocumentCollection unindexedColl = db.search("Form=\"specificform\"", db.getLastFTIndexed(), 0);
unindexedCount = unindexedColl.getCount();
答案 1 :(得分:1)
以下是代码段:
If(db.lastmodified > db.lastftindexed) Then
' Database was modified after index updated , it may be a document or design
Dim T As New NotesDateTime(db.lastftindexed)
Dim UnindexedCount As Long
' Find the modified document after index updated
UnindexedCount = db.Search({@All}, T, 0).Count
Else
' FT index is up to date
UnindexedCount = 0
End If
MsgBox UnindexedCount