Rename POSDBKEY to posdbkey_t

This commit is contained in:
Ai Lin Chia
2016-09-02 16:07:53 +02:00
parent ead15c9753
commit c686ff4d03
9 changed files with 13 additions and 17 deletions

@ -152,8 +152,8 @@ bool Msg2::getLists ( ) {
m_i,
//hostId,
g_posdb.getTermId(sk),
KEYSTR(sk,sizeof(POSDBKEY)),
KEYSTR(ek,sizeof(POSDBKEY)),
KEYSTR(sk,sizeof(posdbkey_t)),
KEYSTR(ek,sizeof(posdbkey_t)),
//sk->n2,
//sk->n1,
//(int32_t)sk->n0,

@ -516,7 +516,7 @@ bool Msg39::getLists () {
// store now in qterm
g_posdb.makeStartKey ( sk , tid , docIdStart );
g_posdb.makeEndKey ( ek , tid , docIdEnd );
qterm->m_ks = sizeof(POSDBKEY);//key144_t);
qterm->m_ks = sizeof(posdbkey_t);
}
// debug msg

@ -368,7 +368,7 @@ void Posdb::makeKey ( void *vkp ,
if ( shardedByTermId ) setShardedByTermIdBit ( kp );
// get the one we lost
// char *kstr = KEYSTR ( kp , sizeof(POSDBKEY) );
// char *kstr = KEYSTR ( kp , sizeof(posdbkey_t) );
// if (!strcmp(kstr,"0x0ca3417544e400000000000032b96bf8aa01"))
// log("got lost key");
}
@ -445,7 +445,7 @@ int64_t Posdb::getTermFreq ( collnum_t collnum, int64_t termId ) {
int64_t numBytes = m_rdb.getBuckets()->getListSize(collnum, (char *)&startKey, (char *)&endKey, NULL, NULL);
// convert from size in bytes to # of recs
maxRecs += numBytes / sizeof(POSDBKEY);
maxRecs += numBytes / sizeof(posdbkey_t);
// RdbList list;
// makeStartKey ( &startKey, termId );
@ -534,7 +534,7 @@ void printTermList ( int32_t i, const char *list, int32_t listSize ) {
int Posdb::printList ( RdbList &list ) {
bool justVerify = false;
POSDBKEY lastKey;
posdbkey_t lastKey;
// loop over entries in list
for ( list.resetListPtr() ; ! list.isExhausted() && ! justVerify ;
list.skipCurrentRecord() ) {

@ -88,9 +88,7 @@
const char *getHashGroupString ( unsigned char hg );
float getTermFreqWeight ( int64_t termFreq , int64_t numDocsInColl );
#ifndef POSDBKEY
#define POSDBKEY key144_t
#endif
typedef key144_t posdbkey_t;
#ifndef TERMID_MASK
#define TERMID_MASK (0x0000ffffffffffffLL)

@ -4524,7 +4524,7 @@ bool PosdbTable::allocTopScoringDocIdsData() {
// tally. each new docid in this termlist will compress
// the 6 byte termid out, so reduce by 6.
nn2 += list->m_listSize / ( sizeof(POSDBKEY) -6 );
nn2 += list->m_listSize / ( sizeof(posdbkey_t) -6 );
}
// if doing docid range phases where we compute the winning docids

@ -16,9 +16,7 @@ float getHashGroupWeight ( unsigned char hg );
#define SITERANKDIVISOR 3.0
#define SITERANKMULTIPLIER 0.33333333
#ifndef POSDBKEY
#define POSDBKEY key144_t
#endif
typedef key144_t posdbkey_t;
#ifndef TERMID_MASK
#define TERMID_MASK (0x0000ffffffffffffLL)

@ -1231,7 +1231,7 @@ class TermDebugInfo {
char m_hashGroup;
int32_t m_wordNum;
int32_t m_wordPos;
POSDBKEY m_key; // key144_t
posdbkey_t m_key; // key144_t
// 0 = not a syn, 1 = syn from presets,2=wikt,3=generated
char m_synSrc;
int64_t m_langBitVec64;

@ -74,7 +74,7 @@ static bool storeTerm ( const char *s ,
HashTableX *wts ,
char synSrc ,
char langId ,
POSDBKEY key ) {
posdbkey_t key ) {
// store prefix
int32_t poff = wbuf->length();

@ -4646,8 +4646,8 @@ void dumpPosdb (const char *coll, int32_t startFileNum, int32_t numFiles, bool i
g_posdb.makeStartKey ( &startKey, termId );
g_posdb.makeEndKey ( &endKey, termId );
printf("termid=%" PRIu64"\n",termId);
printf("startkey=%s\n",KEYSTR(&startKey,sizeof(POSDBKEY)));
printf("endkey=%s\n",KEYSTR(&endKey,sizeof(POSDBKEY)));
printf("startkey=%s\n",KEYSTR(&startKey,sizeof(posdbkey_t)));
printf("endkey=%s\n",KEYSTR(&endKey,sizeof(posdbkey_t)));
}
// turn off threads
g_jobScheduler.disallow_new_jobs();