Search::Odeum::Document - Perl interface to the Odeum inverted index API.


Search-Odeum documentation Contained in the Search-Odeum distribution.

Index


Code Index:

NAME

Top

Search::Odeum::Document - Perl interface to the Odeum inverted index API.

SYNOPSIS

Top

  use Search::Odeum;
  my $doc = Search::Odeum::Document->new('http://www.example.com/');

DESCRIPTION

Top

Search::Odeum::Document represents a Odeum document data structure.

METHODS

Top

Search::Odeum::Document->new($uri)

Create new Search::Odeum::Document instance. $uri specifies the URI of a document.

attr($key, $value)

set or get an attribute to a document. $key specifies the name of an attribute. $value specifies the value of attribute. if $valuve is omitted the stored attribute value will be returned.

addword($normal, $asis)

add a word to the document. $noraml specifies the noramlized form of word. $asis specifies the appearance form of word. Search::Odeum does not provide the method to extract words from text and normalize it.

id

get the ID of document.

uri

get the URI of document.

SEE ALSO

Top

http://qdbm.sourceforge.net/

AUTHOR

Top

Tomohiro IKEBE, <ikebe@shebang.jp>

COPYRIGHT AND LICENSE

Top


Search-Odeum documentation Contained in the Search-Odeum distribution.

package Search::Odeum::Document;

use strict;

sub new {
    my($class, $uri) = @_;
    $class->xs_new($uri);
}

sub attr {
    my($class, $key, $value) = @_;
    if (defined $value) {
        $class->addattr($key, $value);
    }
    $class->getattr($key);
}


1;

__END__