I am trying to write a program interface using the Lotus C++ API. The program is suppose to able access the documents from the notes database.
Currently, i am using LNViewFolder::FTSearch retrieved a specific record. This is working fine, until i notice that the the search function does not work until a Full Text Index is created in the Lotus Notes Interface. Also without the index being updated, the LNNavigator does not seems to work as well.
Is there anyway to create the Index or update the index using the C++ API? Or is there any other way to go around this problem? I thank all who can give me a bit of advice or at least give me some lead on this matter.
Thanks to all in advance. Attached below is my sample code. I must add that there is nothing wrong with my codes though. Just missing some codes to create the full text index.
you can use c-api FTIndex to create a fulltext, but this doesn’t work for remote-dbs.
LNDatabase::Search allows you to search for specific notes, but that will be much slower.
Do you really need fulltext search? Maybe you’ll find a workaround? c-api gives you more control for searches (you can limit search to specific views/folders, by time…)
Actually i am just to create a User interface to access(add/edit/delete) the names.nsf and the calendar database. Currently i am trying to develop a search function to be incorporate to the interface.
So it will be good if i can actually which fields to search for. For example if i would want to search for John in the ‘FirstName’ column and not John from every other column as what the FTSearch and LNViewFolder::Find function is doing now.
Also can you tell me how to search for a range of dates. Do i have to define an LNAgent to use its LNSearch function? I notice there is a LNSearchByDateInField function. Is that the functions to use in this case?
i think FTSearch can also be limited to certain fields…
LNSearch (not shure) needs an agent stored in db, so can’t be used without changing db.
LNDatabase::Search takes as input LNSearchOptions. Using ::SetBeginDate/SetEndDate you can limit search to only a subset of documents. (will be faster than including this in searchformula, but i’m not shure).
Limiting search to certain fields is easy, just create your own search formula. (as used for views).