A bit further

This commit is contained in:
Julian M. Kunkel 2019-05-14 21:08:30 +01:00
parent a92a0810f4
commit 848f452430
2 changed files with 48 additions and 0 deletions

36
docker/elasticsearch.json Normal file
View File

@ -0,0 +1,36 @@
{
"settings" : {
"number_of_shards" : 1
},
"mappings" : {
"document": {
"properties" : {
"cluster" : {
"properties": {
"id": {"type": "keyword"}
}
},
"title" : { "type" : "text"},
"title_cleaned" : {
"type" : "text",
"index": "no"
},
"author" : { "type" : "text"},
"url" : { "type" : "text", "index": "not_analyzed"},
"notes" : { "type" : "text"},
"tags" : { "type" : "text"},
"group_name" : { "type" : "keyword", "index": "not_analyzed"},
"group_description" : { "type" : "text", "index":
"not_analyzed"},
"group_image" : { "type" : "keyword", "index":
"not_analyzed"},
"discipline" : { "type" : "keyword"},
"extras" : { "type" : "text"},
"language" : { "type" : "keyword"},
"created_at" : { "type" : "date",
"format": "yyyyMMdd"
}
}
}
}
}

View File

@ -0,0 +1,12 @@
#!/usr/bin/bash
# https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.0.1
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.0.1
# curl http://elasticsearch:9200/_cat/health
curl -XPUT -H 'Content-Type: application/json' -T elasticsearch.json 'http://localhost:9200/app'
# https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html
curl -GET "http://localhost:9200/_cat/indices?v"