View.FTSearch and NotesViewNavigator

Hi There,

I’m having a problem with the NotesViewNavigator upon the Documents returned by FTSearch method. The navigator returned all the documents in the view instead just the searched results.

Anybody have an idea how can I have the Navigator only to the search results docs not all the view documents.

Im using the following code.


Call v.Refresh

Call db.UpdateFTIndex( True )

query = "FIELD OrderDate >= " & Format(fromdate, “dd/mm/yyyy” ) & " AND FIELD OrderDate <= " & Format( todate, “dd/mm/yyyy” )

’ Print Query

’ j = v.FTSearch( query, 0 )

’ Print “

Total Records Found” & Cstr(j)

’ If j > 0 Then

Set nav = v.CreateViewNav

Set entry = nav.GetFirst  



             While Not(entry Is Nothing)

	

      If entry.IsCategory Then

	' do somthing here		

                   End If

             Wend

       End if

Any response would be apprecited

Eddir

Subject: View.FTSearch and NotesViewNavigator

An FTSearch returns just documents in the view, sorted in order of relevance. There are no categories, so just use notesview.GetFirstdocument etc. to get the docs.

Subject: RE: View.FTSearch and NotesViewNavigator

Hi Dan,Thanks for the prompt reply.

My problem is that I cannot use the plain docs. I need the Categories & Subcategories titles and their totals for my reporting.

I need to generate the usage report based upon the 3 levels of categorization for a specific date range.

I tried with the PutInFolder method as well but that only works for one user. I mean If I create the folders for users dynamically I cannot do the formating (first 3 columns as catgory) for all those folders generated by LS.

Eddie

Subject: RE: View.FTSearch and NotesViewNavigator

I don’t think you can do what you’re trying to do, FTSearch won’t return the categories.

There are two ways you could do this I guess:

  1. Just navigate the view using a notesnavigator, going through the top level categories until you have a match for the report, then export the relevant details. Depending on the size of the view speed could be a problem though.

  2. Use private folders. Create a shared, private on first use folder then use that. This is dependant on the app being Notes only of course.