JASSv2
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
JASS::serialise_ci Class Reference

Serialse an index into source files for use with JASS_compiled_index.cpp. More...

#include <serialise_ci.h>

Inheritance diagram for JASS::serialise_ci:
Inheritance graph
[legend]
Collaboration diagram for JASS::serialise_ci:
Collaboration graph
[legend]

Public Member Functions

 serialise_ci (size_t documents)
 Constructor. More...
 
 ~serialise_ci ()
 
void finish (void)
 Do any final cleaning up.
 
virtual void operator() (const slice &term, const index_postings &postings, compress_integer::integer document_frequency, compress_integer::integer *document_ids, index_postings_impact::impact_type *term_frequencies)
 The callback function to serialise the postings (given the term) is operator(). More...
 
virtual void operator() (size_t document_id, const slice &primary_key)
 The callback function to serialise the primary keys (external document ids) is operator(). More...
 
- Public Member Functions inherited from JASS::index_manager::delegate
 delegate (size_t documents)
 Destructor.
 
virtual ~delegate ()
 Destructor.
 

Static Public Member Functions

static void unittest (void)
 Unit test this class.
 

Private Attributes

file postings_file
 The postings file.
 
file postings_header_file
 The header file for the postings file (so that the vocab can point to the methods)
 
file vocab_file
 The vocabulary file (also know as the dictionary file)
 
file primary_key_file
 The list of primary keys.
 
uint64_t terms
 The number of terms in the vocabulary file.
 

Additional Inherited Members

- Public Attributes inherited from JASS::index_manager::delegate
size_t documents
 The number of documents in the collection.
 

Detailed Description

Serialse an index into source files for use with JASS_compiled_index.cpp.

Andrew Trotman (University of Otago) and Jimmy Lin (University of Waterloo) proposed serialising the index into source code and then the index and the search engine are all the same single file. This is an implementaiton of this, indexing into a postings file (and header), a vocabulary file.

Constructor & Destructor Documentation

◆ serialise_ci()

JASS::serialise_ci::serialise_ci ( size_t  documents)

Constructor.

Parameters
documents[in] The numner of socuments in the collection.

◆ ~serialise_ci()

JASS::serialise_ci::~serialise_ci ( )
inline

Destructor

Member Function Documentation

◆ operator()() [1/2]

void JASS::serialise_ci::operator() ( const slice term,
const index_postings postings,
compress_integer::integer  document_frequency,
compress_integer::integer document_ids,
index_postings_impact::impact_type term_frequencies 
)
virtual

The callback function to serialise the postings (given the term) is operator().

Parameters
term[in] The term name.
postings[in] The postings lists.
document_frequency[in] The document frequency of the term
document_ids[in] An array (of length document_frequency) of document ids.
term_frequencies[in] An array (of length document_frequency) of term frequencies (corresponding to document_ids).

Implements JASS::index_manager::delegate.

◆ operator()() [2/2]

void JASS::serialise_ci::operator() ( size_t  document_id,
const slice primary_key 
)
virtual

The callback function to serialise the primary keys (external document ids) is operator().

Parameters
document_id[in] The internal document identfier.
primary_key[in] This document's primary key (external document identifier).

Implements JASS::index_manager::delegate.


The documentation for this class was generated from the following files: