Hi,
I have a notesdocumentcollection that I get from notesdocument.Responses.
Now, this main document can have multiple responses (using multiple forms). So once I have a docCollection, I want to search for documents with a specific form name say “A”. How do I do that? FTSearch does not allow me to do that.
Subject: How big is the collection?
Assuming that you are not having hundreds of responses to each document, just loop through the collection and look for the documents with Form=“A”.
Subject: Something like this…
set col = maindoc.Responsesset child = col.GetFirstDocument
Do Until child Is Nothing
If child.GetItemValue(“Form”)(0) = “FormA” Then
'*** Do your stuff here
End If
set child = col.GetNextDocument(child)
Loop
Subject: You can do an FTSearch on a collection
So do the first search on alldocuments(which is itself a collection to give you a collectionThen do another one on that collection
e.g. (from the help…)
Set db = session.CurrentDatabase
Set collection = db.FTSearch(“Business”, 10)
Call collection.FTSearch(“Presentations”,10)
Subject: True…
Since OP wanted to find only the child documents using a particular form, I thought looping through a handful of documents would be as fast as FTSearch in the collections.
But you are perfectly right, one can do FTSearch in an existing collection to narrow it down further.