I have a Notes form that lets a user build a search string and then execute the search. It works great in 4.6x, 5.x and 6.x, EXCEPT isn R6x when one of the search criterion is Numeric, it returns with error 4005 – no documents meet the criteria. It works fine in 4.6x and 5.x.
SearchString = (FIELD FORM = DataEntryForm) AND ( FIELD StratRating = 2 )
Set coll = db.ftSearch(SearchString,0)
Running the same request using the native Notes search tool yields correct results.
Any ideas how to fix?
Thanks in advance.
Subject: RE: ftSearch formula works in 4.x and 5.x but not 6.x
I’m assuming you just forgot to include quotes in your posting since what you have there would not compile.
I’ve done numeric searches in Notes 6 with no problem, have not seen this. I’ve done searches that don’t return any results, and there is no error condition because of this. I’m not sure what code 4005 is, offhand, but it looks to me like Notes considers your query syntax incorrect. This begs two questions:
-
Have you used print statements or the like to make sure the query really is what you think it is?
-
When you do your search in the Notes client, do you do it in the same replica as your code is running in?
My suspicion is that the ft index where the agent is running considers StratRating a text field, perhaps because it is a text field in some of your documents. It’s a matter of chance, which kind the indexer sees first.