Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 1.47 KB

readme.md

File metadata and controls

44 lines (28 loc) · 1.47 KB

NRGI- Elasticsearch API

Install

NRGI-Elasticsearch API can be cloned from gitlab repository and installed. Following the procedure given below:

Run

The app can be run with the command below:

  • install the application dependencies using command: composer install
  • copy .env.example to .env and update your configuration .
  • run php server ie. php -S localhost:8001
  • make sure elasticsearch is running .

Setup Elasticsearch

Elasticsearch indices are automatically created when the first API request is processed if they do not exist already. Indices will be prefixed with the string passed as the INDICES_PREFIX environment variable.

To trigger indices creation manually, run the create-indices.php command in the root of the project:

php create-indices.php

For Linux

  • Download Elasticsearch- wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.12.deb
  • sudo dpkg -i elasticsearch-5.6.12.deb
  • cd /usr/share/elasticsearch
  • sudo bin/plugin install delete-by-query
  • Start Elasticsearch Service sudo service elasticsearch restart

Tools and packages

This application uses following packages: