java - Delay in retriving parent document using FT Search -


i using ft search on $message id field retrieve parent document.my database ft indexed. need parent document accepting meeting invitation. how ever able retrieve document after 2 hours of getting meeting invitation. need help.

string messageid="<off0e85ff0.91fef356-on65257c97.00360343-65257c97.00361318@localdomain>";  if (messageid.contains("@")) {                 string[] strarr = messageid.split("@");                  messageid = strarr[0].replace("<", "");                  system.out.println("message id "+messageid);                 //return messageid;             }              string qry = "field $messageid contains " + messageid;             documentcollection col1 = m_database.ftsearch(qry);             system.out.println("doc col length " +col1.getcount());             document docold = col1.getfirstdocument();             system.out.println(docold.getnoteid()); 

if able retrieve result 1 hour / 2 hours later, ft- index not date, when tries process request. use method updateftindex() of notesdatabase- class make sure, date. of course can check, if date, using getlastftindexed()- method... here example- code designer- use these 2 methods:

 try {   session session = getsession();   agentcontext agentcontext =        session.getagentcontext();   // (your code goes here)    database db = agentcontext.getcurrentdatabase();   string title = db.gettitle();   datetime lastdt = db.getlastftindexed();   datetime nowdt = session.createdatetime("today");   nowdt.setnow();   int dayssince =        nowdt.timedifference(lastdt) / 86400;   if (dayssince > 2) {     system.out.println("database \"" + title +             "\" last full-text indexed " +               dayssince + " days ago");     system.out.println("updating");     db.updateftindex(true); }   else     system.out.println("database \"" + title +          "\" full-text indexed less            2 days ago");  } catch(exception e) {   e.printstacktrace(); } 

additional information: when creating fulltext index database define, how index updated.

but: when selecting "immediate" in dialog, not mean, index date. updating fulltext job of update- task of server. if task "busy" request queued , might delayed time until there resources available doing job.

the performance of fulltextindex updates can enhanced server admin setting notes.ini- variable "update_fulltext_thread" (see this link variable check details).


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -