Dancer::SearchApp - A simple local search engine
Also see Dancer::SearchApp::Installation.
cpanm --look Dancer::SearchApp # Install prerequisites cpanm --installdeps . # Install Elasticsearch https://www.elastic.co/downloads/elasticsearch # Start Elasticsearch # Install Apache Tika from https://tika.apache.org/download.html into jar/ # Launch the web frontend plackup --host 127.0.0.1 -p 8080 -Ilib -a bin\app.pl # Edit filesystem configuration cat >>fs-import.yml fs: directories: - folder: "C:\\Users\\Corion\\Projekte\\App-StarTraders" recurse: true exclude: - ".git" - folder: "t\\documents" recurse: true # Collect some content perl -Ilib -w bin/index-filesystem.pl -f # Search in your browser
Configuration happens through config.yml
elastic_search: home: "./elasticsearch-2.1.1/" index: "dancer-searchapp"
The Elasticsearch instance to used can also be passed in %ENV as SEARCHAPP_ES_NODES.
%ENV
SEARCHAPP_ES_NODES
This web front end can serve not only the extracted content but also the original files from your hard disk. Configure the file system crawler to index only data that you are comfortable with sharing with whoever gets access to the web server.
Consider making the web server only respond on requests originating from 127.0.0.1:
plackup --host 127.0.0.1 -p 8080 -Ilib -a bin\app.pl
Elasticsearch has a long history of vulnerabilities and has little to no concept of information segregation. This basically means that anything that can reach Elasticsearch can read all the data you stored in it.
Configure Elasticsearch to only respond to localhost or to queries from within a trusted network, like your home network.
Note that leaking a copy of the Elasticsearch search index is almost as bad as leaking a copy of the original data. This is especially true if you look at backups.
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
Video on Youtube, German
YAPC::Europe 2016, Cluj, English
Video on Youtube, English
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.