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

NAME

Dancer::SearchApp::Entry - a search index entry

SYNOPSIS

  my $entry = Dancer::SearchApp::Entry->new({
      url => 'http://www.example.com/',
      title => 'An Example',
      content => '<html>...</html>',
      language => 'en',
      mime_type => 'text/html',
      author => 'A. U. Thor',
  });

This is a aonvenience package to hold the information on an entry in the index. This should basically match whatever you have in the index, like an ORM or a glorified hash.

METHODS

->url

->id

->mime_type

->author

->creation_date

->content

->title

->folder

->language

->from_es

Parses the elements as returned from Elasticsearch.

->basic_mime_type

  if( 'text/plain' eq $item->basic_mime_type ) {
      print "<pre>" . $item->content . "</pre>"
  }

Converts

  text/plain; encoding=Latin-1

to

  text/plain

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.