ajindex


Data type AjPBtNode

Btree node

Attributes

NameTypeDescription
BlockOffsetOffset within mainindex
NkeysNumber of keys filled
TotLenTotal length of keys
LeftLeft Sibling
RightRight Sibling
OverflowOffset to overflow block
PrevNodePrevious node
NodeTypeRoot, Internal or Leaf
PaddingPadding to alignment boundary


Data type AjPBtMem

Dynamic list for btree memory arrays

Attributes

NameTypeDescription
nextnext node
prevprevious node
karraykey array (primary trees)
parraypointer arrays (primary and secondary trees)
overflowsoverflows (primary) and keys (secondary)
usednode in use
PaddingPadding to alignment boundary


Data type AjPBtId

Btree ID

Attributes

NameTypeDescription
idUnique ID
dbnoDatabase file number
dupsDuplicates
offsetOffset within database file (ftello)
refoffsetOffset within reference database file (ftello)


Data type AjPBtWild

Btree wildcard

Attributes

NameTypeDescription
idWildcard ID
pagenoPage number of leaf
listlist of AjPBtIds
firsttrue for first search
PaddingPadding to alignment boundary


Data type AjPBucket

Bucket structure on disc

Key, filenumber, ftell ID, subkey page (char*, ajint, ajlong, ajlong)

Attributes

NameTypeDescription
NodeTypeNode type
NentriesNumber of entries
OverflowOffset to overflow block
keylenkey lengths
IdsIds


Data type AjPBtNumId

Btree ID

Attributes

NameTypeDescription
offsetOffset within database file (ftello)
refoffsetOffset within reference database file (ftello)
dbnoDatabase file number
PaddingPadding to alignment boundary


Data type AjPNumBucket

Offset bucket structure on disc

Key, filenumber, ftell ID, subkey page (char*, ajint, ajlong, ajlong)

Attributes

NameTypeDescription
NodeTypeNode type
NentriesNumber of entries
OverflowOffset to overflow block
NumIdsecondary tree IDs


Data type AjPBtpage

Btree page

Attributes

NameTypeDescription
pagenoPage number
nextNext page
prevPrevious page
bufBuffer
dirtyBT_DIRTY if page needs to be written to disc
PaddingPadding to alignment boundary


Data type AjPBtcache

B tree cache

Attributes

NameTypeDescription
fpTree index file pointer
totsizeTree index length
lruLeast recently used cache page
mruMost recently used cache page
pagesizeSize of cache pages
listLengthNumber of pages in cache
orderOrder of primary tree
levelDepth of primary tree
cachesizeMaximum number of pages to cache
nperbucketNumber of entries in a primary bucket
replaceReplacement ID
countNumber of entries indexed
deletedDeletion flag
slevelDepth of secondary tree
sorderOrder of secondary tree
snperbucketNumber of entries in a secondary bucket
secrootblockSecondary tree root block
bmemPrimary array allocation MRU bottom
tmemPrimary array allocation MRU top
bsmemSecondary array allocation MRU bottom
tsmemSecondary array allocation MRU top
kwlimitMax length of secondary key
PaddingPadding to alignment boundary


Data type AjPBtPri

Btree primary keyword

Attributes

NameTypeDescription
keywordkeyword
treeblockdisc block of secondary tree
idId string


Data type AjPPriBucket

Keyword primary bucket structure on disc

Attributes

NameTypeDescription
NodeTypeNode type
NentriesNumber of entries
OverflowOffset to overflow block
keylenkey lengths
codesPrimary keywords


Data type AjPSecBucket

Keyword secondary bucket structure on disc

Attributes

NameTypeDescription
NodeTypeNode type
NentriesNumber of entries
OverflowOffset to overflow block
keylenkey lengths
idsIds


Data type AjPBtKeyWild

Btree keyword wildcard object

Attributes

NameTypeDescription
keywordWildcard keyword
pagenoPage number of primary tree leaf
listlist of AjPBtPris
cachecache for secondary tree
idlistlist of AjPStr IDs
secpagenoPage number of secondary tree leaf
firsttrue for first search
PaddingPadding to alignment boundary


Data type AjPBtHybrid

Btree ID

Attributes

NameTypeDescription
key1Unique ID
dbnoDatabase file number
dupsDuplicates
offsetOffset within database file (ftello)
refoffsetOffset within reference database file (ftello)
treeblockSecondary tree root page