I try to use FTSearch in a NotesView Collection searching by a FIELD Value but i cant figure out how it worksI work with VB .NET
Particularly i use PostedDate FIELD as below
Dim dt as Date= New Date(2009,1,1,10,0,0)
MailView.FTSearch(“FIELD PostedDate >=” & dt.ToShortDateString, 0)
The problem is that it doesnt work as I would expect.
First I run right after the same code using the relational operator “<” instead “>=” as below
MailView.FTSearch(“FIELD PostedDate <” & dt.ToShortDateString, 0)
and unexpectedly produces the same document collection.
The same PostedDate is simultaneously older and earlier from a particular Date. Im gonna crazy.
Subject: Re: FTSearch with dates
The first diagnostic I always do with FTSearch, is to find out the exact string that’s being used as a query, and try that same query manually in the view to see what I get.
It certainly doesn’t make sense that you would get the same set of documents with these two different searches. However, from your code I don’t see you saving off the return value of the function. Probably you should post your code – not some other statements that sort of resemble your code – because the problem might be with your logic or variable names rather than the FTSearch function.
Working with Date/Time Values in Lotus Notes also discusses things that can go wrong with this type of search.