Commit c8987758 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Add some basic documentation for mappings

parent 242b84ef
## Elasticsearch Mapping Templates
These mapping templates are used by elasticsearch to create the search & utility indices of
the Memobase service.
These templates are used to ensure that the index is always built consistently.
These mappings can be added via the Kibana Console or directly via curl. Each template is added
under a specific name:
* `documents.template.json` -> `documents-template`
* `institutions.template.json` -> `institutions-template`
* `record-sets.template.json` -> `record-sets-template`
* `reports.template.json` -> `reports-template`
### Kibana Console
Update a template:
```
PUT _template/<nameOfTemplate>-template
<copy content of json file>
```
### CURL
```bash
ssh -L 8080:mb-es1:8080 swissbib@mb-es1.memobase.unibas.ch
```
```bash
curl -X PUT "localhost:8080/_template/documents-template" -H 'Content-Type: application/json' -d @documents.template.json
```
```bash
curl -X PUT "localhost:8080/_template/institutions-template" -H 'Content-Type: application/json' -d @institutions.template.json
```
```bash
curl -X PUT "localhost:8080/_template/record-sets-template" -H 'Content-Type: application/json' -d @record-sets.template.json
```
```bash
curl -X PUT "localhost:8080/_template/reports-template" -H 'Content-Type: application/json' -d @reports.template.json
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment