Dancer::SearchApp::IndexSchema - schema definition for the Elasticsearch index
create_mapping
Defines a Dancer::SearchApp index. This is currently the following specification:
"properties" => { "url" => { type => "string" }, # file://-URL "title" => multilang_text('title',$analyzer), "author" => multilang_text('author', $analyzer), "content" => multilang_text('content',$analyzer), 'mime_type' => { type => "string" }, # text/html etc. "creation_date" => { "type" => "date", "format" => "yyyy-MM-dd kk:mm:ss", # yay for Joda, yet-another-timeparser-format }, },
find_or_create_index
my $found = find_or_create_index( $es, $index_name, $lang, $type ); $found->then( sub { my( $name ) = @_; print "Using index '$name'\n"; });
Returns the full name for the index $index_name, concatenated with the language. The language is important to chose the correct stemmer. Existing indices will be cached in the package global variable %indices.
$index_name
%indices
The public repository of this module is https://github.com/Corion/dancer-searchapp.
The public support forum of this module is https://perlmonks.org/.
I've given a talk about this module at Perl conferences:
German Perl Workshop 2016, German
Please report bugs in this module via the RT CPAN bug queue at https://rt.cpan.org/Public/Dist/Display.html?Name=Dancer-SearchApp or via mail to dancer-searchapp-Bugs@rt.cpan.org.
Max Maischein corion@cpan.org
corion@cpan.org
Copyright 2014-2016 by Max Maischein corion@cpan.org.
This module is released under the same terms as Perl itself.
To install Dancer::SearchApp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer::SearchApp
CPAN shell
perl -MCPAN -e shell install Dancer::SearchApp
For more information on module installation, please visit the detailed CPAN module installation guide.