lotus notes search by date with Java api

﹥>﹥吖頭↗ 提交于 2019-12-06 03:09:56

You should get rid of the square brackets on the field name. The search method expects a Notes Formula, like what you'd put into a view selection formula:

"Date > [03/20/2012]"

It might also be required that dates are in mm/dd/yyyy format, though if you are in a non-US locale I'm not 100% sure.

You mentioned that you have been doing full text searches in the database, so it is definitely worth mentioning this... If the database actually has a full text index, then you may want to consider using the NotesDatabase.FTSearch() method instead of NotesDatabase.Search(). The FTSearch method will be considerably faster for a large database.

The syntax for FTSearch is different from the syntax for Search. You could use either "FIELD Date > 03/20/2012" or "[Date] > 03/20/2012".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!