Untitled
unknown
plain_text
2 years ago
3.6 kB
27
Indexable
loader: build: context: . dockerfile: ./etl/Dockerfile container_name: loader-etl ports: - "127.0.0.1:5555:5555" env_file: - .env command: > bash -c ' until curl -sS "http://elasticsearch:9200/_cat/health?h=status" | grep -q "green\|yellow"; do sleep 1 done curl -X PUT "http://elasticsearch:9200/movies" -H "Content-Type: application/json" -d ' { "settings": { "refresh_interval": "1s", "analysis": { "filter": { "english_stop": { "type": "stop", "stopwords": "_english_" }, "english_stemmer": { "type": "stemmer", "language": "english" }, "english_possessive_stemmer": { "type": "stemmer", "language": "possessive_english" }, "russian_stop": { "type": "stop", "stopwords": "_russian_" }, "russian_stemmer": { "type": "stemmer", "language": "russian" } }, "analyzer": { "ru_en": { "tokenizer": "standard", "filter": [ "lowercase", "english_stop", "english_stemmer", "english_possessive_stemmer", "russian_stop", "russian_stemmer" ] } } } }, "mappings": { "dynamic": "strict", "properties": { "id": { "type": "keyword" }, "imdb_rating": { "type": "float" }, "genre": { "type": "keyword" }, "title": { "type": "text", "analyzer": "ru_en", "fields": { "raw": { "type": "keyword" } } }, "description": { "type": "text", "analyzer": "ru_en" }, "director": { "type": "text", "analyzer": "ru_en" }, "actors_names": { "type": "text", "analyzer": "ru_en" }, "writers_names": { "type": "text", "analyzer": "ru_en" }, "actors": { "type": "nested", "dynamic": "strict", "properties": { "id": { "type": "keyword" }, "name": { "type": "text", "analyzer": "ru_en" } } }, "writers": { "type": "nested", "dynamic": "strict", "properties": { "id": { "type": "keyword" }, "name": { "type": "text", "analyzer": "ru_en" } } } } } }' ' depends_on: - elasticsearch - db
Editor is loading...