diff --git a/Makefile b/Makefile index b5f23933582e6f45915a13555409830debcbc09f..a6628af539d7725f0362ec02fc2faada5b221e41 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,18 @@ +run: + docker-compose up -d + +stop: + docker-compose down + +destroy: + docker-compose down -v + build: docker build -t openlobby/openlobby-es-czech:latest . push: docker push openlobby/openlobby-es-czech:latest + +release: + make build + make push diff --git a/README.md b/README.md index 7325ea1d1381e2a2723f6a8c7053a92b2ed14ef4..4c266e986b5740ff4fccb3d26acd2dfc2f1138eb 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,60 @@ # Elasticsearch with Czech analyzer +Batteries included: + - ICU Analysis Plugin + - Czech Hunspell dictionaries (from OpenOffice) + +X-Pack plugin is removed. + +## Usage + +Create your index with these settings: + +``` +{ + 'settings': { + 'analysis': { + 'filter': { + 'czech_stop': { + 'type': 'stop', + 'stopwords': '_czech_', + }, + 'czech_stemmer': { + 'type': 'stemmer', + 'language': 'czech', + }, + 'cs_CZ': { + 'type': 'hunspell', + 'locale': 'cs_CZ', + 'dedup': True, + } + }, + 'analyzer': { + 'czech': { + 'tokenizer': 'standard', + 'filter': [ + 'icu_folding', + 'lowercase', + 'czech_stop', + 'czech_stemmer', + 'cs_CZ', + ] + } + } + } + } +} +``` + +You can use `'czech'` analyzer on text fields now. + +## Build + +Build docker container: `make build` + +## Run for local development + +Run Elasticsearch on port 9200: `make run` +Stop Elasticsearch container: `make stop` + +Stop and/or remove volume with data: `make destroy`