FTSearch with NotesName

Hi! I need to use NotesDocumentCollection.FTSearch to search get documents that contain a particular NotesName (in any field)

However, the runtime error returned is “Query is not understandable”

this is what I used

“Call personDC.FTSearch(“CN=user1/O=com1”, 0)”

If I changed the search query to

“Call personDC.FTSearch(“user1/com1”, 0)”

the error is gone. However this is not the desired search query.

Anyone can provide workaround/advice?

Subject: FTSearch with NotesName

I’ve solved my problem. Actually I made a mistake here.

Call personDC.FTSearch(“CN=user1/O=com1”, 0)

should be

strSearch = {“} & {CN=user1/O=com1} & {”}

Call personDC.FTSearch(strSearch, 0)

so that the search string is interpreted as a string, instead of a formula (due to the equal signs in the string)