How to mimic the search facility of notes

hello,

I had an application that searches for docs from the notesdatabase then put all the docs to a folder. My problem is when docs found are 1000+, it will took 2-3 minutes to display the docs on the folder. Can anyone give a suggestion or is there a way I can mimic the built-in search of notes, what I want is the action after the search is done then it displays the result on the view and when you click the clear result button it goes back to its original content.

P.S.

I hope to hear from everybody soon. Thanks in advance.

This is my code:

Sub SearchFullTextAndFields

Dim db As notesdatabase

Dim docSearch As New notesdocument( s.currentdatabase )

Dim coll As notesdocumentcollection

Dim dateTime As New notesdatetime( Now )

On Error Goto errorHandling

Set db = s.currentdatabase

Call dateTime.AdjustDay(-10000)

’ Display the search dialog box

If Not uiwork.dialogbox(“DialogSearch”, True, True, False, False, False, False, msgTitleSearch$, docSearch ) Then Exit Sub

’ create search string

searchString$ = GetSearchCriteria( docSearch )

strMaxDocs = “100” ’ max doc’s returned from search

’ Search

If searchString$ <> “” Then Set coll = db.Search( searchString$, dateTime, 0 ) '03232006

’ countFound

If coll Is Nothing Then countFound% = 0 Else countFound% = coll.count '03232006

’ Exit if nothing found

If countFound% = 0 Then

Msgbox msgNoDocumentsFound$, MB_ICONINFO, msgTitleMain$

Exit Sub

End If

Call coll.putallinfolder(“Search”)

uiwork.viewrefresh ’ in case search initiated from folder

If IDOK = Msgbox ( msgFoundDocs$ & Cstr(countFound%) & " documents" & Chr(10) , MB_ICONINFORMATION + MB_OK, db.Title ) Then

End If

Exit Sub

errorHandling:

Print "Search.SearchFullTextAndFields reports:"

Print Cstr(Err) & " " & Error

Resume Next

End Sub