NRGI-Elasticsearch API can be cloned from gitlab repository and installed. Following the procedure given below:
- git clone [email protected]:web-apps/rces.git
- cd rces
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 .
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
- 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
This application uses following packages:
- ElasticSearch PHP client - for Elastic Search API
- League Route - for Routing
- [PHP dotenv] (https://github.com/vlucas/phpdotenv) - for loading environment variables