Subject: RE: Displaying Search Result From The View
Hi Vignesh,
Yes, I’m searching from Notes Client. Here’s 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 ) '==> Searching is fast…
’ countFound
If coll Is Nothing Then countFound% = 0 Else countFound% = coll.count
’ Exit if nothing found
If countFound% = 0 Then
Msgbox msgNoDocumentsFound$, MB_ICONINFO,
msgTitleMain$
Exit Sub
End If
Call coll.putallinfolder(“Search”) '==> Displaying search result (1000+ docs) it took 3-4 minutes waiting time.
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