Dezi::Lucy::Searcher - Dezi Apache Lucy Searcher
my $searcher = Dezi::Lucy::Searcher->new( invindex => 'path/to/index', max_hits => 1000, find_relevant_fields => 1, # default: 0 nfs_mode => 1, # default: 0 ); my $results = $searcher->search( 'foo bar' ); while (my $result = $results->next) { printf("%4d %s\n", $result->score, $result->uri); }
Dezi::Lucy::Searcher is an Apache Lucy based Searcher class for Dezi::App.
Dezi::Lucy::Searcher is not made to replace the more fully-featured Lucy::Search::Searcher class and its friends. Instead, Dezi::Lucy::Searcher provides a simple API similar to other Dezi::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 Lucy::Search::Searcher directly.
All the SWISH::3 constants are imported into this namespace, including:
SWISH_DOC_PROP_MAP
Only new and overridden methods are documented here. See the Dezi::Searcher documentation.
Called internally by new(). Additional parameters include:
Set to true to have the Results object locate the fields that matched the query. Default is 0 (off).
Set to true if your index is stored on a NFS filesystem. Extra locking precautions are implemented when this mode is on (1). Default is off (0).
Overrides base method to return a Search::Query::Parser config for the Lucy Dialect.
Returns array ref of PropertyNames defined for the invindex. The array will not contain any alias names or reserved PropertyNames.
Returns a Dezi::Lucy::Results object.
query is assumed to be query string compatible with Search::Query::Dialect::Lucy.
See the Dezi::Searcher documentation for a description of opts. Note the following differences:
The order param in opts may be a Lucy::Search::SortSpec object.
The default Boolean connector for parsing query. Valid values are AND and OR. The default is AND (which is different than Lucy::QueryParser, but the same as Swish-e).
Returns the internal Lucy::Search::PolySearcher object.
Peter Karman, <karpet@dezi.org>
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.
bug-dezi-app at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Dezi::App
You can also look for information at:
Website
http://dezi.org/
IRC
#dezisearch at freenode
Mailing list
https://groups.google.com/forum/#!forum/dezi-search
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dezi-App
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Dezi-App
CPAN Ratings
http://cpanratings.perl.org/d/Dezi-App
Search CPAN
https://metacpan.org/dist/Dezi-App/
Copyright 2018 by Peter Karman
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://dezi.org/, http://swish-e.org/, http://lucy.apache.org/
To install Dezi::App, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dezi::App
CPAN shell
perl -MCPAN -e shell install Dezi::App
For more information on module installation, please visit the detailed CPAN module installation guide.