The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

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.

REPOSITORY

The public repository of this module is https://github.com/Corion/dancer-searchapp.

SUPPORT

The public support forum of this module is https://perlmonks.org/.

TALKS

I've given a talk about this module at Perl conferences:

German Perl Workshop 2016, German

BUG TRACKER

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.

AUTHOR

Max Maischein corion@cpan.org

COPYRIGHT (c)

Copyright 2014-2016 by Max Maischein corion@cpan.org.

LICENSE

This module is released under the same terms as Perl itself.