diff --git a/docker/conf/docker-compose-mac.yml.dist b/docker/conf/docker-compose-mac.yml.dist index 65fb644759..f33ce056af 100644 --- a/docker/conf/docker-compose-mac.yml.dist +++ b/docker/conf/docker-compose-mac.yml.dist @@ -90,6 +90,14 @@ services: environment: - discovery.type=single-node + kibana: + image: docker.elastic.co/kibana/kibana-oss:7.6.0 + container_name: shopsys-framework-kibana + depends_on: + - elasticsearch + ports: + - "5601:5601" + volumes: shopsys-framework-sync: external: true diff --git a/docker/conf/docker-compose-win.yml.dist b/docker/conf/docker-compose-win.yml.dist index 2540167730..63d7b44625 100644 --- a/docker/conf/docker-compose-win.yml.dist +++ b/docker/conf/docker-compose-win.yml.dist @@ -90,6 +90,14 @@ services: environment: - discovery.type=single-node + kibana: + image: docker.elastic.co/kibana/kibana-oss:7.6.0 + container_name: shopsys-framework-kibana + depends_on: + - elasticsearch + ports: + - "5601:5601" + volumes: pgdata: driver: local diff --git a/docker/conf/docker-compose.yml.dist b/docker/conf/docker-compose.yml.dist index bb85a37752..7c607cfd25 100644 --- a/docker/conf/docker-compose.yml.dist +++ b/docker/conf/docker-compose.yml.dist @@ -88,6 +88,14 @@ services: environment: - discovery.type=single-node + kibana: + image: docker.elastic.co/kibana/kibana-oss:7.6.0 + container_name: shopsys-framework-kibana + depends_on: + - elasticsearch + ports: + - "5601:5601" + volumes: elasticsearch-data: driver: local diff --git a/docker/elasticsearch/Dockerfile b/docker/elasticsearch/Dockerfile index 837fd96c1a..e543ee2f10 100644 --- a/docker/elasticsearch/Dockerfile +++ b/docker/elasticsearch/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.elastic.co/elasticsearch/elasticsearch-oss:6.3.2 +FROM docker.elastic.co/elasticsearch/elasticsearch-oss:7.6.0 # install ICU Analysis plugin to sort by language properly RUN bin/elasticsearch-plugin install analysis-icu diff --git a/src/Resources/definition/product/1.json b/src/Resources/definition/product/1.json index a298f1debd..095986b1dd 100644 --- a/src/Resources/definition/product/1.json +++ b/src/Resources/definition/product/1.json @@ -83,166 +83,164 @@ } }, "mappings": { - "_doc": { - "properties": { - "name": { - "type": "text", - "analyzer": "stemming", - "fields": { - "full_with_diacritic": { - "type": "text", - "analyzer": "full_with_diacritic" - }, - "full_without_diacritic": { - "type": "text", - "analyzer": "full_without_diacritic" - }, - "edge_ngram_with_diacritic": { - "type": "text", - "analyzer": "edge_ngram_with_diacritic" - }, - "edge_ngram_without_diacritic": { - "type": "text", - "analyzer": "edge_ngram_without_diacritic" - }, - "keyword": { - "type": "icu_collation_keyword", - "language": "en", - "index": false - } + "properties": { + "name": { + "type": "text", + "analyzer": "stemming", + "fields": { + "full_with_diacritic": { + "type": "text", + "analyzer": "full_with_diacritic" + }, + "full_without_diacritic": { + "type": "text", + "analyzer": "full_without_diacritic" + }, + "edge_ngram_with_diacritic": { + "type": "text", + "analyzer": "edge_ngram_with_diacritic" + }, + "edge_ngram_without_diacritic": { + "type": "text", + "analyzer": "edge_ngram_without_diacritic" + }, + "keyword": { + "type": "icu_collation_keyword", + "language": "en", + "index": false } - }, - "catnum": { - "type": "text", - "analyzer": "keyword", - "fields": { - "edge_ngram": { - "type": "text", - "analyzer": "edge_ngram_unanalyzed", - "search_analyzer": "keyword" - } + } + }, + "catnum": { + "type": "text", + "analyzer": "keyword", + "fields": { + "edge_ngram": { + "type": "text", + "analyzer": "edge_ngram_unanalyzed", + "search_analyzer": "keyword" } - }, - "partno": { - "type": "text", - "analyzer": "keyword", - "fields": { - "edge_ngram": { - "type": "text", - "analyzer": "edge_ngram_unanalyzed", - "search_analyzer": "keyword" - } + } + }, + "partno": { + "type": "text", + "analyzer": "keyword", + "fields": { + "edge_ngram": { + "type": "text", + "analyzer": "edge_ngram_unanalyzed", + "search_analyzer": "keyword" } - }, - "ean": { - "type": "text", - "analyzer": "keyword", - "fields": { - "edge_ngram": { - "type": "text", - "analyzer": "edge_ngram_unanalyzed", - "search_analyzer": "keyword" - } + } + }, + "ean": { + "type": "text", + "analyzer": "keyword", + "fields": { + "edge_ngram": { + "type": "text", + "analyzer": "edge_ngram_unanalyzed", + "search_analyzer": "keyword" } - }, - "short_description": { - "type": "text", - "analyzer": "edge_ngram_without_diacritic" - }, - "description": { - "type": "text", - "analyzer": "edge_ngram_without_diacritic_html" - }, - "flags": { - "type": "integer" - }, - "brand": { - "type": "integer" - }, - "categories": { - "type": "integer" - }, - "prices": { - "type": "nested", - "properties": { - "pricing_group_id": { - "type": "integer" - }, - "price_with_vat": { - "type": "float" - }, - "price_without_vat": { - "type": "float" - }, - "vat": { - "type": "float" - }, - "price_from": { - "type": "boolean" - } + } + }, + "short_description": { + "type": "text", + "analyzer": "edge_ngram_without_diacritic" + }, + "description": { + "type": "text", + "analyzer": "edge_ngram_without_diacritic_html" + }, + "flags": { + "type": "integer" + }, + "brand": { + "type": "integer" + }, + "categories": { + "type": "integer" + }, + "prices": { + "type": "nested", + "properties": { + "pricing_group_id": { + "type": "integer" + }, + "price_with_vat": { + "type": "float" + }, + "price_without_vat": { + "type": "float" + }, + "vat": { + "type": "float" + }, + "price_from": { + "type": "boolean" } - }, - "in_stock": { - "type": "boolean" - }, - "parameters": { - "type": "nested", - "properties": { - "parameter_id": { - "type": "integer" - }, - "parameter_value_id": { - "type": "integer" - } + } + }, + "in_stock": { + "type": "boolean" + }, + "parameters": { + "type": "nested", + "properties": { + "parameter_id": { + "type": "integer" + }, + "parameter_value_id": { + "type": "integer" } - }, - "ordering_priority": { - "type": "integer" - }, - "calculated_selling_denied": { - "type": "boolean" - }, - "selling_denied": { - "type": "boolean" - }, - "availability": { - "type": "text" - }, - "is_main_variant": { - "type": "boolean" - }, - "detail_url": { - "type": "text" - }, - "visibility": { - "type": "nested", - "properties": { - "pricing_group_id": { - "type": "integer" - }, - "visible": { - "type": "boolean" - } + } + }, + "ordering_priority": { + "type": "integer" + }, + "calculated_selling_denied": { + "type": "boolean" + }, + "selling_denied": { + "type": "boolean" + }, + "availability": { + "type": "text" + }, + "is_main_variant": { + "type": "boolean" + }, + "detail_url": { + "type": "text" + }, + "visibility": { + "type": "nested", + "properties": { + "pricing_group_id": { + "type": "integer" + }, + "visible": { + "type": "boolean" } - }, - "uuid": { - "type": "text" - }, - "unit": { - "type": "text" - }, - "is_using_stock": { - "type": "boolean" - }, - "stock_quantity": { - "type": "integer" - }, - "variants": { - "type": "integer" - }, - "main_variant_id": { - "type": "integer" } + }, + "uuid": { + "type": "text" + }, + "unit": { + "type": "text" + }, + "is_using_stock": { + "type": "boolean" + }, + "stock_quantity": { + "type": "integer" + }, + "variants": { + "type": "integer" + }, + "main_variant_id": { + "type": "integer" } } } diff --git a/src/Resources/definition/product/2.json b/src/Resources/definition/product/2.json index a3f9ae9cab..3ef9c3145a 100644 --- a/src/Resources/definition/product/2.json +++ b/src/Resources/definition/product/2.json @@ -83,166 +83,164 @@ } }, "mappings": { - "_doc": { - "properties": { - "name": { - "type": "text", - "analyzer": "stemming", - "fields": { - "full_with_diacritic": { - "type": "text", - "analyzer": "full_with_diacritic" - }, - "full_without_diacritic": { - "type": "text", - "analyzer": "full_without_diacritic" - }, - "edge_ngram_with_diacritic": { - "type": "text", - "analyzer": "edge_ngram_with_diacritic" - }, - "edge_ngram_without_diacritic": { - "type": "text", - "analyzer": "edge_ngram_without_diacritic" - }, - "keyword": { - "type": "icu_collation_keyword", - "language": "cs", - "index": false - } + "properties": { + "name": { + "type": "text", + "analyzer": "stemming", + "fields": { + "full_with_diacritic": { + "type": "text", + "analyzer": "full_with_diacritic" + }, + "full_without_diacritic": { + "type": "text", + "analyzer": "full_without_diacritic" + }, + "edge_ngram_with_diacritic": { + "type": "text", + "analyzer": "edge_ngram_with_diacritic" + }, + "edge_ngram_without_diacritic": { + "type": "text", + "analyzer": "edge_ngram_without_diacritic" + }, + "keyword": { + "type": "icu_collation_keyword", + "language": "cs", + "index": false } - }, - "catnum": { - "type": "text", - "analyzer": "keyword", - "fields": { - "edge_ngram": { - "type": "text", - "analyzer": "edge_ngram_unanalyzed", - "search_analyzer": "keyword" - } + } + }, + "catnum": { + "type": "text", + "analyzer": "keyword", + "fields": { + "edge_ngram": { + "type": "text", + "analyzer": "edge_ngram_unanalyzed", + "search_analyzer": "keyword" } - }, - "partno": { - "type": "text", - "analyzer": "keyword", - "fields": { - "edge_ngram": { - "type": "text", - "analyzer": "edge_ngram_unanalyzed", - "search_analyzer": "keyword" - } + } + }, + "partno": { + "type": "text", + "analyzer": "keyword", + "fields": { + "edge_ngram": { + "type": "text", + "analyzer": "edge_ngram_unanalyzed", + "search_analyzer": "keyword" } - }, - "ean": { - "type": "text", - "analyzer": "keyword", - "fields": { - "edge_ngram": { - "type": "text", - "analyzer": "edge_ngram_unanalyzed", - "search_analyzer": "keyword" - } + } + }, + "ean": { + "type": "text", + "analyzer": "keyword", + "fields": { + "edge_ngram": { + "type": "text", + "analyzer": "edge_ngram_unanalyzed", + "search_analyzer": "keyword" } - }, - "short_description": { - "type": "text", - "analyzer": "edge_ngram_without_diacritic" - }, - "description": { - "type": "text", - "analyzer": "edge_ngram_without_diacritic_html" - }, - "flags": { - "type": "integer" - }, - "brand": { - "type": "integer" - }, - "categories": { - "type": "integer" - }, - "prices": { - "type": "nested", - "properties": { - "pricing_group_id": { - "type": "integer" - }, - "price_with_vat": { - "type": "float" - }, - "price_without_vat": { - "type": "float" - }, - "vat": { - "type": "float" - }, - "price_from": { - "type": "boolean" - } + } + }, + "short_description": { + "type": "text", + "analyzer": "edge_ngram_without_diacritic" + }, + "description": { + "type": "text", + "analyzer": "edge_ngram_without_diacritic_html" + }, + "flags": { + "type": "integer" + }, + "brand": { + "type": "integer" + }, + "categories": { + "type": "integer" + }, + "prices": { + "type": "nested", + "properties": { + "pricing_group_id": { + "type": "integer" + }, + "price_with_vat": { + "type": "float" + }, + "price_without_vat": { + "type": "float" + }, + "vat": { + "type": "float" + }, + "price_from": { + "type": "boolean" } - }, - "in_stock": { - "type": "boolean" - }, - "parameters": { - "type": "nested", - "properties": { - "parameter_id": { - "type": "integer" - }, - "parameter_value_id": { - "type": "integer" - } + } + }, + "in_stock": { + "type": "boolean" + }, + "parameters": { + "type": "nested", + "properties": { + "parameter_id": { + "type": "integer" + }, + "parameter_value_id": { + "type": "integer" } - }, - "ordering_priority": { - "type": "integer" - }, - "calculated_selling_denied": { - "type": "boolean" - }, - "selling_denied": { - "type": "boolean" - }, - "availability": { - "type": "text" - }, - "is_main_variant": { - "type": "boolean" - }, - "detail_url": { - "type": "text" - }, - "visibility": { - "type": "nested", - "properties": { - "pricing_group_id": { - "type": "integer" - }, - "visible": { - "type": "boolean" - } + } + }, + "ordering_priority": { + "type": "integer" + }, + "calculated_selling_denied": { + "type": "boolean" + }, + "selling_denied": { + "type": "boolean" + }, + "availability": { + "type": "text" + }, + "is_main_variant": { + "type": "boolean" + }, + "detail_url": { + "type": "text" + }, + "visibility": { + "type": "nested", + "properties": { + "pricing_group_id": { + "type": "integer" + }, + "visible": { + "type": "boolean" } - }, - "uuid": { - "type": "text" - }, - "unit": { - "type": "text" - }, - "is_using_stock": { - "type": "boolean" - }, - "stock_quantity": { - "type": "integer" - }, - "variants": { - "type": "integer" - }, - "main_variant_id": { - "type": "integer" } + }, + "uuid": { + "type": "text" + }, + "unit": { + "type": "text" + }, + "is_using_stock": { + "type": "boolean" + }, + "stock_quantity": { + "type": "integer" + }, + "variants": { + "type": "integer" + }, + "main_variant_id": { + "type": "integer" } } } diff --git a/tests/App/Functional/Component/Elasticsearch/ElasticsearchStructureUpdateCheckerTest.php b/tests/App/Functional/Component/Elasticsearch/ElasticsearchStructureUpdateCheckerTest.php new file mode 100644 index 0000000000..e69de29bb2