NAME

KinoSearch::Doc - A document.

SYNOPSIS

    my $doc = KinoSearch::Doc->new(
        fields => { foo => 'foo foo', bar => 'bar bar' },
    );
    $doc->{foo} = 'new value for field "foo"'
    $doc->set_boost(2);
    $invindexer->add($doc);

DESCRIPTION

A Doc object is akin to a row in a database, in that it is made up of one or more fields, each of which has a value.

CONSTRUCTOR

new( [labeled params] )

    my $doc = KinoSearch::Doc->new(
        fields => { foo => 'foo foo', bar => 'bar bar' },
        boost  => 0.5,
    );
  • fields - Field-value pairs.
  • boost - A scoring multiplier. Default of 1.0.
  • doc_num - Internal KinoSearch document number. Default of 0.

METHODS

set_boost(boost)

Set boost attribute. Setting boost to something other than 1.0 causes a document to score better or worse against a given query relative to other documents.

  • boost - A floating point scoring multiplier.

get_boost()

Get boost attribute.

get_fields()

Return the Doc's backing fields hash.

INHERITANCE

KinoSearch::Doc isa KinoSearch::Obj.

COPYRIGHT

Copyright 2005-2008 Marvin Humphrey

LICENSE, DISCLAIMER, BUGS, etc.

See KinoSearch version 0.20.

Copyright © 2004-2008 Marvin Humphrey