NAME
Dezi::Result - abstract result class
SYNOPSIS
my $results = $searcher->search( 'foo bar' );
while (my $result = $results->next) {
printf("%4d %s\n", $result->score, $result->uri);
}
DESCRIPTION
Dezi::Result is a abstract class. It defines the APIs that all Dezi engines adhere to in returning results from a Dezi::InvIndex.
METHODS
The following methods are all accessors (getters) only.
doc
Returns an object for the backend engine.
score
Returns the ranking score for the Result.
uri
mtime
title
summary
swishdocpath
Alias for uri().
swishlastmodified
Alias for mtime().
swishtitle
Alias for title().
swishdescription
Alias for summary().
swishrank
Alias for score().
get_property( property )
Returns the stored value for property for this Result.
The default behavior is to simply call a method called property on the internal doc() object. Subclasses should implement per-engine behavior.
get_property_array( property )
Returns the stored value for property for the Result. Unlike get_property(), the value is always an arrayref, split on the libswish3 multi-value character.
Example:
my $val = $result->get_property('foo'); # "green\003blue"
my $arrval = $result->get_property_array('foo'); # ['green', 'blue']
Note that return value will *always* be an arrayref, even if the original value does not contain a multi-value character.
property_map
Set by the parent Results, a hashref of property aliases to real names. Used by get_property().
AUTHOR
Peter Karman, <karpet@dezi.org>
BUGS
Please report any bugs or feature requests to bug-dezi-app at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dezi-App. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Dezi::Result
You can also look for information at:
Website
IRC
#dezisearch at freenode
Mailing list
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
COPYRIGHT AND LICENSE
Copyright 2014 by Peter Karman
This library is free software; you can redistribute it and/or modify it under the terms of the GPL v2 or later.
SEE ALSO
http://dezi.org/, http://swish-e.org/, http://lucy.apache.org/