Return TypeFunction nameArguments
hzEcodehdbIndexText::Insert(const hzString&,unsigned int,)

Declared in file: hzDatabase.h
Defined in file : hdbIndex.cpp

Function Logic:

0:START 1:lcword hzString::ToLower hzMapS::Exists 2:m_Keys.Exists(lcword) 3:hdbIdset::Insert 4:hdbIdset::Insert hzMapS::Insert rc 5:rc!=E_OK 6:Err2Txt 7:Return rc

Function body:

hzEcode hdbIndexText::Insert (const hzString& word, unsigned int docId)
{
   _hzfunc("hdbIndexText::Insert(int)") ;
   hdbIdset    bm ;
   hzString    lcword ;
   hzEcode     rc = E_OK ;
   lcword = word ;
   lcword.ToLower() ;
   if (m_Keys.Exists(lcword))
       m_Keys[lcword].Insert(docId) ;
   else
   {
       bm.Insert(docId) ;
       rc = m_Keys.Insert(lcword, bm) ;
       if (rc != E_OK)
           hzerr(rc, "Failed to insert doc_id of %d into bitmap. Error=%s\n", docId, Err2Txt(rc)) ;
   }
   return rc ;
}