Inconsistancy in ftsearch results

Hello,I have a lotusscript agent, that runs on the web.

Basicaly, the part of the code that is the problem is the following:

Set view3 = db.getview(“(”+cdoc.Username(0)+“)”)

Set vc2 = view3.AllEntries

Set item = cdoc.GetFirstItem(cdoc.SearchField(0))

q = Trim(item.text)

Call vc2.FTSearch(q, 0)

total = vc2.count

Basicaly, it creates a viewEntryCollection based on a view, then does a ftsearch and returns the result. When I run this code on local, on the replica, which is not indexed. I obtain the correct result. When I run it on the db in the server, which is indexed, it always returns 0!

I’m stuck on this, any help is welcome.

Ced

Subject: Inconsistancy in ftsearch results

When running on server does the view contain the same documents as the local replica? You may want to add a msgbox to display the count of the view collection before you try to search (right after set vc2 = view3.AllEntries). Does it display the expected number of documents?

Subject: RE: Inconsistancy in ftsearch results

Yes, I confirm that the view contains the same documents as the local replica. Before the line “Call vc2.FTSearch(q, 0)”, all the variables contains the same values (vc2.count = 32), and after the ftsearch, vc2.count=10 on local (which is correct) and vc2.count=0 in the server…

Subject: Problem solved

It’s my fault, the problem was not the ftsearch method but the place where I used it.

Thanks.