2.2 Building and Loading: the Constructors

In the Quick Start (Section 2.1) we have seen the function make_catalog, which creates a new catalog in the file system.

We also need to see how to load a catalog that already exists, that was created some time before. This is done using directly the class Catalog:

    >>> from itools.catalog import Catalog
    >>>
    >>> catalog = Catalog('catalog_test')

This call expects the file system path where the catalog was created.

Just to summarize these are the ways to build and to load, respectively, a catalog object:

The fields to be indexed are defined by the indexed objects. This we will see in the next section.