例: Clear method (NotesView - LotusScript®)

次のスクリプトはビューで全文検索を実行します。全文検索でビューが抽出されると、そのビュー内のすべての文書 (検索条件を満たす文書) をフォルダに入れます。次に、スクリプトは全文検索をクリアしてから、ビュー内のすべての文書 (検索条件を満たす文書と満たさない文書の両方) を別のフォルダに入れます。結果は次のようになります。

Dim folderName As String
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView( "Transportation" )
Call view.FTSearch( "bicycle", 0 )
' view is filtered
Set doc = view.GetFirstDocument
While Not ( doc Is Nothing )
  Call doc.PutInFolder( "Two-wheeled vehicles" )
  Set doc = view.GetNextDocument( doc )
Wend
' clear the full-text search
Call view.Clear
' view is no longer filtered
' view methods now operate on all documents in view
' move all documents to different folder
Set doc = view.GetFirstDocument
While Not ( doc Is Nothing )
  Call doc.PutInFolder( "Vehicles" )
  Set doc = view.GetNextDocument( doc )
Wend