| Data-SearchEngine documentation | Contained in the Data-SearchEngine distribution. |
Data::SearchEngine::Results::Faceted - Facet role for Results
package Data::SeachEngine::Foo;
with 'Data::SearchEngine::Results::Faceted';
sub search {
# do stuff
$results->set_facet('foo', 'bar');
}
Provides storage and methods for retrieving facet information.
HashRef of facets for this query. The HashRef is keyed by the name of the facet and the values are the facet's value.
Returns an array of all the keys of facets.
Gets the facet with the specified name. Returns undef if one does not exist.
Sets the facet with the specified name.
Cory G Watson, <gphat at cpan.org>
Copyright 2009 Cory G Watson
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
| Data-SearchEngine documentation | Contained in the Data-SearchEngine distribution. |
package Data::SearchEngine::Results::Faceted; use Moose::Role; has facets => ( traits => [ 'Hash' ], is => 'rw', isa => 'HashRef[Any]', default => sub { {} }, handles => { facet_names=> 'keys', get_facet => 'get', set_facet => 'set', } ); 1; __END__