NAME

dezi - Dezi server app

SYNOPSIS

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'

DESCRIPTION

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.

OPTIONS

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.

debug

Turns on verbosity in stderr Plack logging.

dezi-config file

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.

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:

search_path path

The /-prefixed URI path where the Dezi server should accept incoming searcher requests. Defaults to '/search'.

index_path path

The /-prefixed URI path where the Dezi server should accept incoming indexer requests. Defaults to '/index'.

server-class class_name

Use class_name instead of the default 'Dezi::Server'. Useful if you want to create your own server subclass of Dezi::Server.

ui-class class_name

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

admin-class class_name

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

elastic

If set, UndefinedMetaTags is set to 'auto' in the indexer_config.

auto_commit

engine_config auto_commit flag is explicitly set. Use --no-auto_commit to disable.

Alias is --ac (--no-ac).

AUTHOR

Peter Karman, <karman at cpan.org>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc dezi

You can also look for information at:

ACKNOWLEDGEMENTS

Marvin Humphrey for a great library in Apache Lucy.

The Plack community.

COPYRIGHT & LICENSE

Copyright 2011-2018 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.

SEE ALSO

Search::OpenSearch, SWISH::3, SWISH::Prog::Lucy, Plack, Lucy, http://dezi.org