Dezi-App
view release on metacpan or search on metacpan
lib/Dezi/Indexer/Config.pm view on Meta::CPAN
bool => sub {1},
fallback => 1,
);
use namespace::autoclean;
our $VERSION = '0.016';
# only a few explicitly named attributes.
# everything else is through AUTOLOAD.
has '_orig_args' => ( is => 'ro', isa => HashRef, default => sub { {} } );
has 'file' => ( is => 'rw', isa => 'Path::Class::File', coerce => 1, );
has 'swish3_config' => ( is => 'ro', isa => Str );
my $XML = Search::Tools::XML->new;
my %ReservedFieldNames = map { $_ => 1 } qw(uri title summary mtime);
my %unique = map { $_ => 1 } qw(
MetaNames
PropertyNames
lib/Dezi/InvIndex/Header.pm view on Meta::CPAN
use MooseX::Types::Path::Class;
use Carp;
use SWISH::3 qw( :constants );
use namespace::autoclean;
our $VERSION = '0.016';
has 'invindex' => ( is => 'rw', isa => DeziInvIndex, required => 1 );
has 'file' => ( is => 'ro', isa => 'Path::Class::File', coerce => 1, );
has 'data' => ( is => 'ro', isa => HashRef );
has 'swish3_config' => ( is => 'ro', isa => InstanceOf ['SWISH::3::Config'] );
# index metadata. read/write libswish3 file xml format.
#
sub header_file {
return SWISH_HEADER_FILE();
}
# back compat
lib/Dezi/Result.pm view on Meta::CPAN
use Moose;
use MooseX::StrictConstructor;
with 'Dezi::Role';
use Carp;
use namespace::autoclean;
our $VERSION = '0.016';
has 'doc' => ( is => 'ro', isa => 'Object', required => 1, );
has 'score' => ( is => 'ro', isa => 'Num', required => 1 );
has 'property_map' => ( is => 'ro', isa => 'HashRef', required => 1 );
=head1 NAME
Dezi::Result - abstract result class
=head1 SYNOPSIS
my $results = $searcher->search( 'foo bar' );
while (my $result = $results->next) {
printf("%4d %s\n", $result->score, $result->uri);
lib/Dezi/Results.pm view on Meta::CPAN
use MooseX::StrictConstructor;
with 'Dezi::Role';
use Carp;
use namespace::autoclean;
our $VERSION = '0.016';
has 'hits' => ( is => 'ro', isa => 'Int', required => 1 );
has 'query' => ( is => 'ro', isa => 'Search::Query::Dialect', required => 1 );
has 'payload' => ( is => 'ro', isa => 'Object', required => 1 );
has 'property_map' => ( is => 'ro', isa => 'HashRef', required => 1 );
=head1 NAME
Dezi::Results - base results class
=head1 SYNOPSIS
my $searcher = Dezi::Searcher->new(
invindex => 'path/to/index',
query_class => 'Dezi::Query',
lib/Dezi/Searcher.pm view on Meta::CPAN
coerce => 1,
);
has 'qp_config' =>
( is => 'rw', isa => HashRef, builder => 'init_qp_config', lazy => 1, );
has 'qp' => (
is => 'rw',
isa => InstanceOf ['Search::Query::Parser'],
builder => 'init_qp',
lazy => 1,
);
has 'property_map' => ( is => 'ro', isa => HashRef );
=head1 NAME
Dezi::Searcher - base searcher class
=head1 SYNOPSIS
my $searcher = Dezi::Searcher->new(
invindex => 'path/to/index',
max_hits => 1000,
lib/Dezi/Test/ResultsPayload.pm view on Meta::CPAN
package Dezi::Test::ResultsPayload;
use Moose;
with 'Dezi::Role';
use Carp;
use namespace::autoclean;
has 'docs' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'urls' => ( is => 'ro', isa => 'ArrayRef', required => 1 );
has 'scores' => ( is => 'ro', isa => 'HashRef', required => 1 );
__PACKAGE__->meta->make_immutable;
1;
=head1 AUTHOR
Peter Karman, E<lt>karpet@dezi.orgE<gt>
=head1 BUGS
( run in 0.846 second using v1.01-cache-2.11-cpan-5f2e87ce722 )