The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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

VERSION

version 0.31

SYNOPSIS

  my $results = Data::SearchEngine::Results->new;

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

DESCRIPTION

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

ATTRIBUTES

id

A unique identifier for this item.

score

The score this item earned.

values

The name value pairs for this item.

METHODS

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

Cory G Watson <gphat@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Cold Hard Code, LLC.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.