Download the PHP package caillaudpa/elasticsearch-pdf-importer without Composer
On this page you can find all versions of the php package caillaudpa/elasticsearch-pdf-importer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download caillaudpa/elasticsearch-pdf-importer
More information about caillaudpa/elasticsearch-pdf-importer
Files in caillaudpa/elasticsearch-pdf-importer
Package elasticsearch-pdf-importer
Short Description PDF importer for elasticsearch
License MIT
Homepage https://github.com/caminoezequiel
Informations about the package elasticsearch-pdf-importer
Elasticsearch PDF importer
It allows you import PDF files to elasticsearch and search in them.
Requirements
- Elasticsearch (version 6)
- ingest-attachment plugin (see the doc)
If you haven't installed ingest-attachment
plugin run this in your server:
Installation
Installing composer package
Installing the Attachment Processor in a Pipeline
You need to create a pipeline with the attachment processor. For it, you can choose following:
- Create a symfony's command (see here)
- Create a php file and run it (see here)
- Or via
curl
in command line:
How to use
The basic is create a Index, a Document and call to importer.
You can add more field calling to:
Also you can do data processing before send its to elasticsearch, you only need to do an implementation of ProcessorInterface
I have implemented a processor to reduce pdf size with Ghostscript via command line.
Requirements: php need to allow exec
function, server need to have installed ghostscript libgs-dev imagemagick
on ubuntu server