NAME

KinoSearch::InvIndex - An inverted index.

SYNOPSIS

    my $invindex = MySchema->clobber('/path/to/invindex');
    
    # ... which is equivalent to:
    my $folder = KinoSearch::Store::FSFolder->new( 
        path => '/path/to/invindex',
    );
    my $invindex = KinoSearch::InvIndex->clobber(
        schema => MySchema->new,
        folder => $folder,
    );

DESCRIPTION

"InvIndex" is short for "inverted index", the name for the data structure which KinoSearch is based around. Generically, an inverted index, as opposed to any other kind of index, contains mappings from keywords to documents, allowing you to look up a term and find out where it occurs within a collection.

A KinoSearch::InvIndex object has two main parts: a Schema and a Folder. The Schema describes how the index data is structured, and the Folder provides the I/O capabilities for actually getting at the data and doing something with it.

InvIndex provides three constructors: clobber(), open(), and read(), which are usually invoked internally via factory methods from Schema. However, when called directly, InvIndex's constructors allow you more flexibility in supplying the folder argument, so you can do things like supply a RAMFolder.

CONSTRUCTOR

new( [labeled params] )

    my $invindex = KinoSearch::InvIndex->clobber(
        schema => $schema,
        folder => $folder,
    );
    
    # or...
    my $invindex = KinoSearch::InvIndex->open(
        schema => $schema,
        folder => $folder,
    );
    
    # or...
    my $invindex = KinoSearch::InvIndex->read(
        schema => $schema,
        folder => $folder,
    );
  • schema - A KinoSearch::Schema.
  • folder - Either a KinoSearch::Store::Folder or a string filepath.

METHODS

get_schema()

Accessor.

get_folder()

Accessor.

INHERITANCE

KinoSearch::InvIndex isa KinoSearch::Obj.

COPYRIGHT

Copyright 2005-2008 Marvin Humphrey

LICENSE, DISCLAIMER, BUGS, etc.

See KinoSearch version 0.20.

Copyright © 2004-2008 Marvin Humphrey