dezi - Dezi server app
Start the Dezi server, listening on port 5000:
% dezi -p 5000
Add a document foo to the index:
% curl http://localhost:5000/index/foo -XPOST \ -d '<doc><title>bar</title>hello world</doc>' \ -H 'Content-Type: application/xml'
Search the index:
% curl 'http://localhost:5000/search?q=bar'
Dezi is a search platform based on Apache Lucy, Swish3, Plack, Search::OpenSearch and Search::Query.
Dezi integrates several CPAN search libraries into one easy-to-use interface.
If you haven't yet read it, the Dezi::Tutorial is a good place to start.
The dezi app supports all the options that Plack::Runner supports. See the plackup perldoc for a description. The following options are specific to dezi.
Turns on verbosity in stderr Plack logging.
file can be in any format supported by Config::Any. The structure expected contains a key called engine_config which is passed directly to Search::OpenSearch::Server::Plack, which in turn passes through to Search::OpenSearch::Engine.
engine_config
See Dezi::Config.
Example (in native Perl format):
use CHI; my $c = { engine_config => { index => [qw( path/to/index1 path/to/index2 )], facets => { names => [qw( color size flavor )], sample_size => 10_000, }, fields => [qw( color size flavor )], # result attributes in response indexer_config => { somekey => somevalue, }, searcher_config => { anotherkey => anothervalue, }, cache => CHI->new( driver => 'File', dir_create_mode => 0770, file_create_mode => 0660, root_dir => "/tmp/opensearch_cache", ), cache_ttl => 3600, do_not_hilite => [qw( color )], snipper_config => { as_sentences => 1 }, # see Search::Tools::Snipper hiliter_config => { class => 'h', tag => 'b' }, # see Search::Tools::HiLiter parser_config => {}, # see Search::Query::Parser auto_commit => 1, # see Search::OpenSearch::Engine::Lucy } };
Other config key options include:
The /-prefixed URI path where the Dezi server should accept incoming searcher requests. Defaults to '/search'.
The /-prefixed URI path where the Dezi server should accept incoming indexer requests. Defaults to '/index'.
Use class_name instead of the default 'Dezi::Server'. Useful if you want to create your own server subclass of Dezi::Server.
Use class_name as a Plack app mounted under /ui. Try Dezi::UI as an example.
/ui
Use Dezi::UI. Shortcut for --ui-class=Dezi::UI
The class_name as a Plack app mounted under /admin. Try Dezi::Admin as an example.
/admin
Use Dezi::Admin. Shortcut for --admin-class=Dezi::Admin
If set, UndefinedMetaTags is set to 'auto' in the indexer_config.
engine_config auto_commit flag is explicitly set. Use --no-auto_commit to disable.
Alias is --ac (--no-ac).
--ac
--no-ac
Peter Karman, <karman at cpan.org>
<karman at cpan.org>
Please report any bugs or feature requests to bug-dezi at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dezi. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-dezi at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc dezi
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
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Dezi
CPAN Ratings
http://cpanratings.perl.org/d/Dezi
Search CPAN
http://search.cpan.org/dist/Dezi/
Marvin Humphrey for a great library in Apache Lucy.
The Plack community.
Copyright 2011 Peter Karman.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
Search::OpenSearch, SWISH::3, SWISH::Prog::Lucy, Plack, Lucy, http://dezi.org
To install Dezi, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dezi
CPAN shell
perl -MCPAN -e shell install Dezi
For more information on module installation, please visit the detailed CPAN module installation guide.