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

NAME

SWISH::Prog::Xapian::Searcher - Swish3 Xapian backend Searcher

SYNOPSIS

 # see SWISH::Prog::Searcher
 

DESCRIPTION

SWISH::Prog::Xapian::Searcher is not made to replace the more fully-featured Search::Xapian. Instead, SWISH::Prog::Xapian::Searcher provides a simple API similar to other SWISH::Prog::Searcher-based backends so that you can experiment with alternate storage engines without needing to change much code. When your search application requirements become more complex, the author recommends the switch to using Search::Xapian directly.

METHODS

Only new and overridden methods are documented here. See the SWISH::Prog::Searcher documentation.

init( params )

Overrides superclass to build map of PropertyNames to ids, since Xapian stores values by id not name.

prop_id_map

Get the read-only internal map for PropertyNames to id values.

search( query [, opts ] )

Returns a SWISH::Prog::Xapian::Results object.

opts is an optional hashref with the following supported key/values:

start

The starting position. Default is 0.

max

The ending position. Default is max_hits().

order

The sort order. Default is by score. This feature is not yet supported.

get_facets

If set to an array ref of field names, then the Results object will contain a hash ref of facet counts for those fields.

facet_sample

How many results to examine when counting facets. Default is all of them.

AUTHOR

Peter Karman, <karman at cpan dot org>

BUGS

Please report any bugs or feature requests to bug-swish-prog-xapian at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SWISH-Prog-Xapian. 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 SWISH::Prog::Xapian

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2009 Peter Karman, all rights reserved.

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