Cheshire3 Objects: Database

Description

A Database is a collection of Records and Indexes. It is responsable for maintaining and allowing access to its components, as well as metadata associated with the collections. It must be able to interpret a request, splitting it amongst its known resources and then recombine the values into a single response.

Implementations

There are no pre-configured databases as this is totally application specific. Configuring a database it your primary task when beginning to use Cheshire3 for your data. There are some example databases including confiuguration available in the download section of the Cheshire3 web-site.

API

Module: cheshire3.database
Classes:

Database Methods:

FunctionParametersReturnsDescription
__init__domNode, parentObject The constructer takes a DOM tree containing the configuration of the database and the object which the database should consider as its parent, normally a Server.
begin_indexingsession Perform any routines required before indexing records. e.g. discover configured indexes, initialize necessary files.
commit_indexingsession Perform any routines needed to complete indexing. e.g. collate temporary index files, commit finished indexes to disk.
commit_metadatasession Perform any routines needed to complete accumulation of metadata. e.g. calculate mean record size, commit values to disk.
clear_indexessession Discover all configured indexes and clear them. This can prevent duplicates if called before re-indexing existing Records.
add_recordsession, record Function to call to ensure that a record is registered with the database. This will only do the registration, you have to call index_record to index it.
index_recordsession, record Sends the record to all known indexes to process
unindex_recordsession, record Remove references to the record from all known indexes. Does not delete the record from the recordStore.
remove_recordsession, record Remove the record from the database's register. This will only unregister the record, you have to call unindex_record to remove pointers from indexes.
scansession, query, numberOfTerms, directionlist of term summariesGiven a query, resolve the index and return the raw information from it.
Each item in the list returned consists of the term it represents (as a string), followed by a sequence of 3 integers: term id, number of matching records, total number of occurences.
searchsession, queryresultSetGiven a query, process it and return a resultSet

Sub-Packages

Sub-Package: vdb
Module: cheshire3.vdb.database