Catalyst::Model::Xapian - Catalyst model for Search::Xapian.
my ($it,$res)= $c->comp('MyApp::M::Xapian')->search(
$c->req->param('page') ||0 ,
This model class wraps Search::Xapian to provide a friendly, paged interface to Xapian (www.xapian.org) indexes. This class adds a little extra convenience on top of the Search::Xapian class. It expects you to use the QueryParser, and sets up some keywords based on the standard omega keywords (id, host, date, month, year,title), so that you can do searches like
Path to the index directory. will default to <MyApp>/index.
Language to use for stemming. Defaults to english
Default page sizes for Data::Page. Defaults to 10.
Queries are passed as utf8 strings. defaults to 1.
Sets weighting to order by docid descending rather than the usual BM25 weighting. Off by default.
Constructor. sets up the db and qp accessors. Is called automatically by Catalyst at startup.
perform a search using the Xapian QueryBuilder. expands the document data using extract_data. You can override the page size per query by passing page size as a final argument to the function. returns a Data::Page object and an arrayref to the extracted document data.
Prepare enquire object before getting mset. Allows you to modify ordering and such in your subclass.
Extract data from a Search::Xapian::Document. Defaults to using Storable::thaw.
Query Parser. The Search::Xapian::QueryParser object used to parse the query.
Marcus Ramberg <firstname.lastname@example.org>
This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.
To install Catalyst::Model::Xapian, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.