Skip to content

HuygensING/timbuctoo-elasticsearch-indexer

Repository files navigation

Timbuctoo Elastic Search Indexer

API

Reindex a specific dataset

URL

/

Method

POST

Content Type

application/json

Request Body

{"dataSetId": <dataset id>}

Example curl

curl -d '{"dataSetId": "dataSetId"}' -H "Content-Type: application/json" -X POST https://localhost/

Reindex all the datasets

URL

/all

Method

POST

Example curl

curl -X POST https://localhost/all

How to test

  1. Create a local image of the Indexer: docker build -t huygensing/timbuctoo-elasticsearch-indexer .

  2. Run the environment: docker-compose up -d

  3. Upload data to Timbuctoo see: https://github.com/HuygensING/timbuctoo#uploading-data

  4. Create an index in Timbuctoo see: https://github.com/HuygensING/timbuctoo/blob/master/documentation/create_an_index_config.adoc

  5. Step 4 should trigger the indexing trigger the indexing. See the API

Development

Run both commands from the root directory of the project.

Compilation of Type script

tsc -w

Running the tool

nodemon dist/**

Start the application

node dist/app.js

Other prerequisites

Make sure: * You have a version of Timbuctoo running and follow the "Getting Started" from the README.adoc. * You have Elasticsearch running For example with docker: https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html * This project uses:

  docker pull docker.elastic.co/elasticsearch/elasticsearch:5.5.2
  docker run -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" docker.elastic.co/elasticsearch/elasticsearch:5.5.2

Add dependencies

yarn add {name of the dependency} --dev install all dependencies: yarn install

Test requests

To test the tool we use Insomnia. The requests can be imported from insomniarequests.json.

Versioning

The releases / versions of this tool will follow the Timbuctoo versions. The version build for Timbuctoo v5.0.0, will be v5.0.0.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •