Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Latest commit

 

History

History
15 lines (9 loc) · 1.49 KB

README.md

File metadata and controls

15 lines (9 loc) · 1.49 KB

oppdrag-faktura

A standalone Elasticsearch application that harvests invoices from Redmine CRM through HTTP transport and index them into Elasticsearch. This application is too specific to the University of Bergen Library but by looking at the source codes, you might get a hint on how to write an application that can communicate with Elasticsearch through HTTP.

How to run the application

  • Download the latest release from https://github.com/ubbdst/oppdrag-faktura/releases. The file contains all dependencies of the project. Hence when extracting, you must keep all files (dependencies) in the same folder.

  • Go to a command line and type java -jar -DapiKey="hakuna-matata" -Dcluster="elasticsearch" -Dhost="kiri.uib.no" /var/lib/oppdrag/oppdrag-faktura-1.0-SNAPSHOT.jar The application will look for the system variable apiKey for authentication, if not provided, default key will be used. Please follow the Redmine documentation for how to get your API key here http://www.redmine.org/projects/redmine/wiki/Rest_api

  • cluster, host, apiKey, index, type can be passed as parameters.

  • After successful authentication, the application will harvest all invoices from https://oppdrag.ub.uib.no and join the available Elasticsearch cluster. By default, all invoices will then be indexed into Elasticsearch with index admin and type invoice.

  • You may then search for documents at http://localhost:9200/admin/invoice/_search?pretty