Data::SearchEngine::Item - An individual search result.


Data-SearchEngine documentation  | view source Contained in the Data-SearchEngine distribution.

Index


NAME

Top

Data::SearchEngine::Item - An individual search result.

SYNOPSIS

Top

  $result->add(Data::SearchEngine::Item->new(
    id => 'SKU',
    values => {
        name => 'Foobar',
        description => 'A great foobar!'
    },
    score => 1.0
  ));

DESCRIPTION

Top

An item represents an individual search result. It's really just a glorified HashRef.

ATTRIBUTES

Top

id

A unique identifier for this item.

values

The name value pairs for this item.

score

The score this item earned.

METHODS

Top

keys

Returns the keys from the values HashRef, e.g. a list of the value names for this item.

get_value

Returns the value for the specified key for this item.

set_value

Sets the value for the specified key for this item.

AUTHOR

Top

Cory G Watson, <gphat at cpan.org>

COPYRIGHT & LICENSE

Top


Data-SearchEngine documentation  | view source Contained in the Data-SearchEngine distribution.