LdbP Union Reference

#include <ldb.h>

List of all members.

Public Attributes

char bytes [8]
lll val

Detailed Description

the isis-1 posting is an 64bit number. In the file it's in big endian order, to allow ordering using memcmp. In the LdbP we have native order to use native 64bit. Until we need more bits for postings, we may use the 64bit type provided by gcc and some other compilers.

the 8 bytes are: highest 3 for the rowid, then 2 tag, then 3 pos. the 3 pos bytes in turn are 1 byte for the occurence and 2 bytes for the word count. (e.g. value 2<<16 | 7 if term was found in the 7th word of the 2nd occurence of field 'tag'). we usually don't care, since for a near condition we always want a small distance w/in the same occurence which may be conveniently checked by the difference of 3 byte pos values.

BUT NOTE: ... unfortunately we DO NEED one more bit for marking postings during AND operations. we abuse the highest bit of the word counter, since it's for sure useless for any reasonable distance check. BE CAREFUL WHEN COMPARING POSTINGS DURING "AND" OP *** use the LDBP_xxM macros below.


The documentation for this union was generated from the following file:
 All Classes Namespaces Functions Variables

Generated on Tue Mar 30 14:47:15 2010 for IsisReader by  doxygen 1.6.1