From 3bc7db24980c7a482e3ebd787be77a6e633ff7cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Katja=20Su=CC=88ss?= Date: Fri, 2 Feb 2024 18:00:06 +0100 Subject: [PATCH] example configuration (mapping, analysis) --- README.md | 7 +- .../dev-opensearch/Dockerfile | 2 + .../dev-opensearch/README.md | 4 + .../dev-opensearch/docker-compose.yml | 99 ++++ .../ingest-configuration/analysis.json | 37 ++ .../ingest-configuration/mappings.json | 486 ++++++++++++++++++ .../mappings_example.json | 455 ++++++++++++++++ .../ingest-configuration/preprocessings.json | 242 +++++++++ .../opensearch-configuration/keywords.txt | 3 + .../opensearch-configuration/lexicon.txt | 7 + 10 files changed, 1340 insertions(+), 2 deletions(-) create mode 100644 example_configuration_opensearch/dev-opensearch/Dockerfile create mode 100644 example_configuration_opensearch/dev-opensearch/README.md create mode 100644 example_configuration_opensearch/dev-opensearch/docker-compose.yml create mode 100644 example_configuration_opensearch/dev-opensearch/ingest-configuration/analysis.json create mode 100644 example_configuration_opensearch/dev-opensearch/ingest-configuration/mappings.json create mode 100644 example_configuration_opensearch/dev-opensearch/ingest-configuration/mappings_example.json create mode 100644 example_configuration_opensearch/dev-opensearch/ingest-configuration/preprocessings.json create mode 100644 example_configuration_opensearch/dev-opensearch/opensearch-configuration/keywords.txt create mode 100644 example_configuration_opensearch/dev-opensearch/opensearch-configuration/lexicon.txt diff --git a/README.md b/README.md index 8afc0064..f279573e 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,13 @@ The block is prepared for Matomo analytics. # Getting started -You have OpenSearch or ElasticSearch up and running. - Install Plone backend add-on [`collective.elastic.plone 2.x`](https://github.com/collective/collective.elastic.plone) to provide the Plone REST API service which accepts queries and requests OpenSearch/ElasticSearch. +Install Plone backend add-on [`collective.elastic.ingest 2.x`](https://github.com/collective/collective.elastic.ingest) to index Plone content. + +Setting up OpenSearch/ElasticSearch instructions can be found on [`collective.elastic.plone 2.x`](https://github.com/collective/collective.elastic.plone). +See the [example](example_configuration_opensearch) configuration of collective.elastic of a mapping, attachment handling and last but not least analysis. + # Configuration diff --git a/example_configuration_opensearch/dev-opensearch/Dockerfile b/example_configuration_opensearch/dev-opensearch/Dockerfile new file mode 100644 index 00000000..c7a56a41 --- /dev/null +++ b/example_configuration_opensearch/dev-opensearch/Dockerfile @@ -0,0 +1,2 @@ +FROM opensearchproject/opensearch:latest +RUN /usr/share/opensearch/bin/opensearch-plugin install --batch ingest-attachment \ No newline at end of file diff --git a/example_configuration_opensearch/dev-opensearch/README.md b/example_configuration_opensearch/dev-opensearch/README.md new file mode 100644 index 00000000..ad7e25ec --- /dev/null +++ b/example_configuration_opensearch/dev-opensearch/README.md @@ -0,0 +1,4 @@ +See OpenSearch with Docker Compose https://github.com/collective/collective.elastic.ingest/tree/fd87bea1d11a97ae231a824aa3a0c145988faede#opensearch-with-docker-compose + + docker buildx use default + docker buildx build --tag opensearch-ingest-attachment:latest . \ No newline at end of file diff --git a/example_configuration_opensearch/dev-opensearch/docker-compose.yml b/example_configuration_opensearch/dev-opensearch/docker-compose.yml new file mode 100644 index 00000000..6f447958 --- /dev/null +++ b/example_configuration_opensearch/dev-opensearch/docker-compose.yml @@ -0,0 +1,99 @@ +# opensearch needs sysctl -w vm.max_map_count=262144 +# see https://stackoverflow.com/questions/66444027/max-virtual-memory-areas-vm-max-map-count-65530-is-too-low-increase-to-at-lea +version: '3' +services: + + ingest: + image: ghcr.io/collective/collective.elastic.ingest:latest + environment: + MAPPINGS_FILE: ${MAPPINGS_FILE} + ANALYSIS_FILE: ${ANALYSIS_FILE} + PREPROCESSINGS_FILE: ${PREPROCESSINGS_FILE} + INDEX_SERVER: ${INDEX_SERVER?unset} + INDEX_USE_SSL: ${INDEX_USE_SSL?unset} + INDEX_OPENSEARCH: ${INDEX_OPENSEARCH?unset} + INDEX_LOGIN: ${INDEX_LOGIN?unset} + INDEX_PASSWORD: ${INDEX_PASSWORD?unset} + CELERY_BROKER: ${CELERY_BROKER?unset} + CELERY_CONCURRENCY: ${CELERY_CONCURRENCY:-1} + CELEREY_LOG_LEVEL: ${CELERY_LOG_LEVEL:-info} + PLONE_SERVICE: ${PLONE_SERVICE?unset} + PLONE_SITE_PREFIX_PATH: ${PLONE_SITE_PREFIX_PATH?unset} + PLONE_USER: ${PLONE_USER?unset} + PLONE_PASSWORD: ${PLONE_PASSWORD?unset} + SENTRY_DSN: ${SENTRY_DSN} + volumes: + - ingest-configuration:/configuration + networks: + - opensearch-net + + redis: + image: 'redis:latest' + networks: + - opensearch-net + ports: + - 6379:6379 + + opensearch: + image: opensearch-ingest-attachment:latest # Specifying the freshly build local image + environment: + - cluster.name=opensearch-cluster + - node.name=opensearch + - discovery.type=single-node + - bootstrap.memory_lock=true + - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx2g" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + volumes: + - opensearch-data:/usr/share/opensearch/data + - "./opensearch-configuration/keywords.txt:/usr/share/opensearch/config/keywords.txt" + - "./opensearch-configuration/lexicon.txt:/usr/share/opensearch/config/lexicon.txt" + ports: + - 9200:9200 # REST API + - 9600:9600 # Performance Analyzer + networks: + - opensearch-net + + opensearch-dashboards: + image: opensearchproject/opensearch-dashboards:latest + ports: + - 5601:5601 + expose: + - "5601" + environment: + OPENSEARCH_HOSTS: '["https://opensearch:9200"]' + networks: + - opensearch-net + + dejavu: + image: appbaseio/dejavu:latest + container_name: dejavu + ports: + - "1358:1358" + expose: + - "1358" + links: + - opensearch + +volumes: + opensearch-data: + ingest-configuration: + driver: local + driver_opts: + type: none + device: ./ingest-configuration + o: bind + # opensearch-configuration: + # driver: local + # driver_opts: + # type: none + # device: ./opensearch-configuration + # o: bind +networks: + opensearch-net: + diff --git a/example_configuration_opensearch/dev-opensearch/ingest-configuration/analysis.json b/example_configuration_opensearch/dev-opensearch/ingest-configuration/analysis.json new file mode 100644 index 00000000..194b395d --- /dev/null +++ b/example_configuration_opensearch/dev-opensearch/ingest-configuration/analysis.json @@ -0,0 +1,37 @@ +{ + "settings": { + "analysis": { + "analyzer": { + "german_analyzer": { + "tokenizer": "standard", + "filter": [ + "lowercase", + "custom_dictionary_decompounder", + "no_stem", + "light_german_stemmer" + ] + }, + "german_exact_analyzer": { + "tokenizer": "standard", + "filter": [ + "lowercase" + ] + } + }, + "filter": { + "custom_dictionary_decompounder": { + "type": "dictionary_decompounder", + "word_list_path": "lexicon.txt" + }, + "no_stem": { + "type": "keyword_marker", + "keywords_path": "keywords.txt" + }, + "light_german_stemmer": { + "type": "stemmer", + "language": "light_german" + } + } + } + } +} \ No newline at end of file diff --git a/example_configuration_opensearch/dev-opensearch/ingest-configuration/mappings.json b/example_configuration_opensearch/dev-opensearch/ingest-configuration/mappings.json new file mode 100644 index 00000000..304edad7 --- /dev/null +++ b/example_configuration_opensearch/dev-opensearch/ingest-configuration/mappings.json @@ -0,0 +1,486 @@ +{ + "behaviors/plone.basic/title": { + "type": "text", + "analyzer": "german_analyzer", + "term_vector": "with_positions_offsets", + "fields": { + "exact": { + "type": "text", + "analyzer": "german_exact_analyzer", + "term_vector": "with_positions_offsets" + } + } + }, + "behaviors/plone.basic/description": { + "type": "text", + "analyzer": "german_analyzer", + "term_vector": "with_positions_offsets", + "fields": { + "exact": { + "type": "text", + "analyzer": "german_exact_analyzer", + "term_vector": "with_positions_offsets" + } + } + }, + "behaviors/plone.categorization/subjects": { + "type": "text", + "analyzer": "german_analyzer", + "term_vector": "with_positions_offsets", + "fields": { + "exact": { + "type": "text", + "analyzer": "german_exact_analyzer", + "term_vector": "with_positions_offsets" + } + } + }, + "behaviors/foo.bar.manualfields/freemanualtags_searchable": { + "type": "text", + "analyzer": "german_analyzer", + "term_vector": "with_positions_offsets", + "fields": { + "exact": { + "type": "text", + "analyzer": "german_exact_analyzer", + "term_vector": "with_positions_offsets" + } + } + }, + "behaviors/rohberg.elasticsearchblocks.elastic_search_blocks/blocks_plaintext": { + "type": "text", + "analyzer": "german_analyzer", + "term_vector": "with_positions_offsets", + "fields": { + "exact": { + "type": "text", + "analyzer": "german_exact_analyzer", + "term_vector": "with_positions_offsets" + } + } + }, + "behaviors/foo.bar.manualfields/manualfile": { + "pipeline": { + "source": "{name}__data", + "target": "{name}__extracted", + "processors": [ + { + "attachment": { + "field": "{source}", + "target_field": "{target}", + "ignore_missing": true + } + }, + { + "remove": { + "field": "{source}", + "ignore_missing": true + } + } + ], + "type": { + "type": "nested", + "dynamic": false, + "properties": { + "author": { + "type": "text" + }, + "content": { + "type": "text" + }, + "content_length": { + "type": "long" + }, + "content_type": { + "type": "keyword" + }, + "date": { + "type": "date" + }, + "keywords": { + "type": "keyword" + }, + "language": { + "type": "keyword" + }, + "name": { + "type": "text" + }, + "title": { + "type": "text" + } + } + }, + "expansion": { + "method": "fetch", + "field": "download" + } + }, + "definition": { + "type": "nested", + "dynamic": false, + "properties": { + "content-type": { + "type": "keyword" + }, + "download": { + "type": "text" + }, + "filename": { + "type": "text" + }, + "size": { + "type": "long" + } + } + } + }, + "behaviors/plone.allowdiscussion/allow_discussion": { + "type": "boolean" + }, + "plone.app.textfield.RichText": { + "pipeline": { + "source": "{name}__data", + "target": "{name}__extracted", + "processors": [ + { + "attachment": { + "field": "{source}", + "target_field": "{target}", + "ignore_missing": true + } + }, + { + "remove": { + "field": "{source}", + "ignore_missing": true + } + } + ], + "type": { + "type": "nested", + "dynamic": false, + "properties": { + "author": { + "type": "text" + }, + "content": { + "type": "text" + }, + "content_length": { + "type": "long" + }, + "content_type": { + "type": "keyword" + }, + "date": { + "type": "date" + }, + "keywords": { + "type": "keyword" + }, + "language": { + "type": "keyword" + }, + "name": { + "type": "text" + }, + "title": { + "type": "text" + } + } + }, + "expansion": { + "method": "field", + "field": "data" + } + }, + "definition": { + "type": "nested", + "dynamic": false, + "properties": { + "data": { + "type": "text" + }, + "content-type": { + "type": "keyword" + }, + "encoding": { + "type": "keyword" + } + } + } + }, + "plone.namedfile.field.NamedBlobFile": { + "pipeline": { + "source": "{name}__data", + "target": "{name}__extracted", + "processors": [ + { + "attachment": { + "field": "{source}", + "target_field": "{target}", + "ignore_missing": true + } + }, + { + "remove": { + "field": "{source}", + "ignore_missing": true + } + } + ], + "type": { + "type": "nested", + "dynamic": false, + "properties": { + "author": { + "type": "text" + }, + "content": { + "type": "text" + }, + "content_length": { + "type": "long" + }, + "content_type": { + "type": "keyword" + }, + "date": { + "type": "date" + }, + "keywords": { + "type": "keyword" + }, + "language": { + "type": "keyword" + }, + "name": { + "type": "text" + }, + "title": { + "type": "text" + } + } + }, + "expansion": { + "method": "fetch", + "field": "download" + } + }, + "definition": { + "type": "nested", + "dynamic": false, + "properties": { + "content-type": { + "type": "keyword" + }, + "download": { + "type": "text" + }, + "filename": { + "type": "text" + }, + "size": { + "type": "long" + } + } + } + }, + "plone.namedfile.field.NamedBlobImage": { + "pipeline": { + "source": "{name}__data", + "target": "{name}__extracted", + "processors": [ + { + "attachment": { + "field": "{source}", + "target_field": "{target}", + "ignore_missing": true + } + }, + { + "remove": { + "field": "{source}", + "ignore_missing": true + } + } + ], + "type": { + "type": "nested", + "dynamic": false, + "properties": { + "author": { + "type": "text" + }, + "content": { + "type": "text" + }, + "content_length": { + "type": "long" + }, + "content_type": { + "type": "keyword" + }, + "date": { + "type": "date" + }, + "keywords": { + "type": "keyword" + }, + "language": { + "type": "keyword" + }, + "name": { + "type": "text" + }, + "title": { + "type": "text" + } + } + }, + "expansion": { + "method": "fetch", + "field": "download" + } + }, + "definition": { + "type": "nested", + "dynamic": false, + "properties": { + "content-type": { + "type": "keyword" + }, + "download": { + "type": "text" + }, + "filename": { + "type": "text" + }, + "size": { + "type": "long" + }, + "height": { + "type": "long" + }, + "width": { + "type": "long" + }, + "scales": { + "type": "nested", + "dynamic": false, + "properties": { + "download": { + "type": "text" + }, + "height": { + "type": "long" + }, + "width": { + "type": "long" + } + } + } + } + } + }, + "plone.schema.jsonfield.JSONField": { + "type": "text" + }, + "z3c.relationfield.schema.RelationList": { + "type": "nested", + "dynamic": false, + "properties": { + "@id": { + "type": "keyword" + }, + "@type": { + "type": "keyword" + }, + "description": { + "type": "text" + }, + "review_state": { + "type": "keyword" + }, + "title": { + "type": "text" + } + } + }, + "z3c.relationfield.schema.RelationChoice": { + "type": "nested", + "dynamic": false, + "properties": { + "@id": { + "type": "keyword" + }, + "@type": { + "type": "keyword" + }, + "description": { + "type": "text" + }, + "review_state": { + "type": "keyword" + }, + "title": { + "type": "text" + } + } + }, + "zope.schema._bootstrapfields.Bool": { + "type": "boolean" + }, + "zope.schema._bootstrapfields.Int": { + "type": "long" + }, + "zope.schema._bootstrapfields.Text": { + "type": "text", + "analyzer": "german_analyzer", + "term_vector": "with_positions_offsets", + "fields": { + "exact": { + "type": "text", + "analyzer": "german_exact_analyzer", + "term_vector": "with_positions_offsets" + } + } + }, + "zope.schema._bootstrapfields.TextLine": { + "type": "text", + "analyzer": "german_analyzer", + "term_vector": "with_positions_offsets", + "fields": { + "exact": { + "type": "text", + "analyzer": "german_exact_analyzer", + "term_vector": "with_positions_offsets" + } + } + }, + "zope.schema._field.ASCIILine": { + "type": "keyword" + }, + "zope.schema._field.Choice": { + "type": "keyword" + }, + "zope.schema._field.Datetime": { + "type": "date" + }, + "zope.schema._field.Dict": { + "type": "object" + }, + "zope.schema._field.Float": { + "type": "double" + }, + "zope.schema._field.List": { + "type": "keyword" + }, + "zope.schema._field.Tuple": { + "type": "keyword" + }, + "zope.schema._field.URI": { + "type": "text" + } +} \ No newline at end of file diff --git a/example_configuration_opensearch/dev-opensearch/ingest-configuration/mappings_example.json b/example_configuration_opensearch/dev-opensearch/ingest-configuration/mappings_example.json new file mode 100644 index 00000000..1ed30087 --- /dev/null +++ b/example_configuration_opensearch/dev-opensearch/ingest-configuration/mappings_example.json @@ -0,0 +1,455 @@ +{ + "behaviors/plone.basic/title": { + "type": "text", + "fields": { + "de": { + "type": "text", + "analyzer": "german" + }, + "en": { + "type": "text", + "analyzer": "english" + } + } + }, + "behaviors/plone.basic/description": { + "type": "text", + "fields": { + "de": { + "type": "text", + "analyzer": "german" + }, + "en": { + "type": "text", + "analyzer": "english" + } + + } + }, + "behaviors/plone.categorization/subjects": { + "type": "text", + "fields": { + "de": { + "type": "text", + "analyzer": "german" + }, + "en": { + "type": "text", + "analyzer": "english" + } + + } + }, + "behaviors/plone.allowdiscussion/allow_discussion": { + "type": "boolean" + }, + + "plone.app.textfield.RichText": { + "pipeline": { + "source": "{name}__data", + "target": "{name}__extracted", + "processors": [ + { + "attachment": { + "field": "{source}", + "target_field": "{target}", + "ignore_missing": true + } + }, + { + "remove": { + "field": "{source}", + "ignore_missing": true + } + } + ], + "type": { + "type": "nested", + "dynamic": false, + "properties": { + "author": { + "type": "text" + }, + "content": { + "type": "text", + "fields": { + "de": { + "type": "text", + "analyzer": "german" + }, + "en": { + "type": "text", + "analyzer": "english" + } + + } + }, + "content_length": { + "type": "long" + }, + "content_type": { + "type": "keyword" + }, + "date": { + "type": "date" + }, + "keywords": { + "type": "keyword" + }, + "language": { + "type": "keyword" + }, + "name": { + "type": "text" + }, + "title": { + "type": "text" + } + } + }, + "expansion": { + "method": "field", + "field": "data" + } + }, + "definition": { + "type": "nested", + "dynamic": false, + "properties": { + "data": { + "type": "text" + }, + "content-type": { + "type": "keyword" + }, + "encoding": { + "type": "keyword" + } + } + } + }, + "plone.namedfile.field.NamedBlobFile": { + "pipeline": { + "source": "{name}__data", + "target": "{name}__extracted", + "processors": [ + { + "attachment": { + "field": "{source}", + "target_field": "{target}", + "ignore_missing": true + } + }, + { + "remove": { + "field": "{source}", + "ignore_missing": true + } + } + ], + "type": { + "type": "nested", + "dynamic": false, + "properties": { + "author": { + "type": "text" + }, + "content": { + "type": "text", + "fields": { + "de": { + "type": "text", + "analyzer": "german" + }, + "en": { + "type": "text", + "analyzer": "english" + } + + } + }, + "content_length": { + "type": "long" + }, + "content_type": { + "type": "keyword" + }, + "date": { + "type": "date" + }, + "keywords": { + "type": "keyword" + }, + "language": { + "type": "keyword" + }, + "name": { + "type": "text" + }, + "title": { + "type": "text", + "fields": { + "de": { + "type": "text", + "analyzer": "german" + }, + "en": { + "type": "text", + "analyzer": "english" + } + } + } + } + }, + "expansion": { + "method": "fetch", + "field": "download" + } + }, + "definition": { + "type": "nested", + "dynamic": false, + "properties": { + "content-type": { + "type": "keyword" + }, + "download": { + "type": "text" + }, + "filename": { + "type": "text" + }, + "size": { + "type": "long" + } + } + } + }, + "plone.namedfile.field.NamedBlobImage": { + "pipeline": { + "source": "{name}__data", + "target": "{name}__extracted", + "processors": [ + { + "attachment": { + "field": "{source}", + "target_field": "{target}", + "ignore_missing": true + } + }, + { + "remove": { + "field": "{source}", + "ignore_missing": true + } + } + ], + "type": { + "type": "nested", + "dynamic": false, + "properties": { + "author": { + "type": "text" + }, + "content": { + "type": "text", + "fields": { + "de": { + "type": "text", + "analyzer": "german" + }, + "en": { + "type": "text", + "analyzer": "english" + } + } + }, + "content_length": { + "type": "long" + }, + "content_type": { + "type": "keyword" + }, + "date": { + "type": "date" + }, + "keywords": { + "type": "keyword" + }, + "language": { + "type": "keyword" + }, + "name": { + "type": "text" + }, + "title": { + "type": "text" + } + } + }, + "expansion": { + "method": "fetch", + "field": "download" + } + }, + "definition": { + "type": "nested", + "dynamic": false, + "properties": { + "content-type": { + "type": "keyword" + }, + "download": { + "type": "text" + }, + "filename": { + "type": "text" + }, + "size": { + "type": "long" + }, + "height": { + "type": "long" + }, + "width": { + "type": "long" + }, + "scales": { + "type": "nested", + "dynamic": false, + "properties": { + "download": { + "type": "text" + }, + "height": { + "type": "long" + }, + "width": { + "type": "long" + } + } + } + } + } + }, + "plone.schema.jsonfield.JSONField": { + "type": "text", + "fields": { + "de": { + "type": "text", + "analyzer": "german" + }, + "en": { + "type": "text", + "analyzer": "english" + } + } + }, + "z3c.relationfield.schema.RelationList": { + "type": "nested", + "dynamic": false, + "properties": { + "@id": { + "type": "keyword" + }, + "@type": { + "type": "keyword" + }, + "description": { + "type": "text" + }, + "review_state": { + "type": "keyword" + }, + "title": { + "type": "text" + } + } + }, + "z3c.relationfield.schema.RelationChoice": { + "type": "nested", + "dynamic": false, + "properties": { + "@id": { + "type": "keyword" + }, + "@type": { + "type": "keyword" + }, + "description": { + "type": "text" + }, + "review_state": { + "type": "keyword" + }, + "title": { + "type": "text" + } + } + }, + "zope.schema._bootstrapfields.Bool": { + "type": "boolean" + }, + "zope.schema._bootstrapfields.Int": { + "type": "long" + }, + "zope.schema._bootstrapfields.Text": { + "type": "text", + "fields": { + "de": { + "type": "text", + "analyzer": "german" + }, + "en": { + "type": "text", + "analyzer": "english" + } + } + }, + "zope.schema._bootstrapfields.TextLine": { + "type": "text", + "fields": { + "de": { + "type": "text", + "analyzer": "german" + }, + "en": { + "type": "text", + "analyzer": "english" + } + } + }, + "zope.schema._field.ASCIILine": { + "type": "keyword" + }, + "zope.schema._field.Choice": { + "type": "nested", + "dynamic": false, + "properties": { + "token": { + "type": "keyword" + }, + "title": { + "type": "text" + } + } + }, + "zope.schema._field.Datetime": { + "type": "date" + }, + "zope.schema._field.Dict": { + "type": "object" + }, + "zope.schema._field.Float": { + "type": "double" + }, + "zope.schema._field.List": { + "type": "keyword" + }, + "zope.schema._field.Tuple": { + "type": "keyword" + }, + "zope.schema._field.URI": { + "type": "text" + } + } diff --git a/example_configuration_opensearch/dev-opensearch/ingest-configuration/preprocessings.json b/example_configuration_opensearch/dev-opensearch/ingest-configuration/preprocessings.json new file mode 100644 index 00000000..f41c85cd --- /dev/null +++ b/example_configuration_opensearch/dev-opensearch/ingest-configuration/preprocessings.json @@ -0,0 +1,242 @@ +[ + { + "comment": "My stuff – Remove info that's irrelevant for search", + "action": "remove", + "configuration": { + "target": "irrelevant field" + } + }, + + + { + "comment": "... needs this information, essential rewrite, do not remove", + "action": "rewrite", + "configuration": { + "source": "@components/collectiveelastic/section_id", + "target": "section", + "enforce": true + } + }, + { + "comment": "Schema for above section_id, do not remove", + "action": "additional_schema", + "configuration": { + "name": "section", + "field": "zope.schema._field.ASCIILine" + } + }, + + { + "comment": "Remove all empty fields.", + "action": "remove_empty" + }, + { + "comment": "Transform vocabularies to it token only form.", + "action": "strip_vocabulary_term_titles" + }, + { + "comment": "ProxyIndex needs this information, essential rewrite, do not remove", + "action": "rewrite", + "configuration": { + "source": "@components/collectiveelastic/catalog_rid", + "target": "rid", + "enforce": true + } + }, + { + "comment": "Schema for above rid, do not remove", + "action": "additional_schema", + "configuration": { + "name": "rid", + "field": "zope.schema._field.ASCIILine" + } + }, + { + "comment": "CESP Restapi Volto endpoint needs this information, essential rewrite, do not remove", + "action": "rewrite", + "configuration": { + "source": "@components/collectiveelastic/allowedRolesAndUsers", + "target": "allowedRolesAndUsers", + "enforce": true + } + }, + { + "comment": "Schema for above allowedRolesAndUsers, do not remove", + "action": "additional_schema", + "configuration": { + "name": "allowedRolesAndUsers", + "field": "zope.schema._field.List" + } + }, + { + "comment": "Remove plone.restapi parent information", + "action": "remove", + "configuration": { + "target": "parent" + } + }, + { + "comment": "Remove plone.restapi lock information", + "action": "remove", + "configuration": { + "target": "lock" + } + }, + { + "comment": "Remove plone.restapi batching information", + "action": "remove", + "configuration": { + "target": "batching" + } + }, + { + "comment": "If Volto is available, this is important for full text search, do not remove unless in Classic UI only environments", + "action": "rewrite", + "configuration": { + "source": "@components/collectiveelastic/blocks_plaintext", + "target": "blocks_plaintext", + "enforce": false + } + }, + { + "comment": "If Volto is available, this is important for full text search, do not remove unless in Classic UI only environments", + "action": "additional_schema", + "configuration": { + "name": "blocks_plaintext", + "field": "zope.schema._bootstrapfields.Text" + } + }, + { + "comment": "If volto.blocks is available, remove all its fields.", + "action": "full_remove", + "configuration": { + "section": "behaviors", + "name": "volto.blocks" + } + }, + { + "comment": "If volto.blocks.editable.layout is available, remove all its fields.", + "action": "full_remove", + "configuration": { + "section": "behaviors", + "name": "volto.blocks.editable.layout" + } + }, + { + "comment": "We want the field to be called portal_type, not @type, so we rewrite it.", + "action": "rewrite", + "configuration": { + "source": "@type", + "target": "portal_type" + } + }, + { + "comment": "Schema for above portal_type", + "action": "additional_schema", + "configuration": { + "name": "portal_type", + "field": "zope.schema._field.ASCIILine" + } + }, + { + "comment": "After all the rewrites, we want to remove the @components field, as it is not needed anymore.", + "action": "remove", + "configuration": { + "target": "@components" + } + }, + { + "comment": "No need for restapi specific folder/collection information.", + "action": "remove", + "configuration": { + "target": "items" + } + }, + { + "comment": "No need for restapi specific information.", + "action": "remove", + "configuration": { + "target": "items_total" + } + }, + { + "comment": "No need for restapi specific information.", + "action": "remove", + "configuration": { + "target": "previous_item" + } + }, + { + "comment": "No need for restapi specific information.", + "action": "remove", + "configuration": { + "target": "next_item" + } + }, + { + "comment": "No need for restapi versioning related information.", + "action": "remove", + "configuration": { + "target": "version" + } + }, + { + "comment": "No need for plone.versioning related information.", + "action": "full_remove", + "configuration": { + "section": "behaviors", + "name": "plone.versioning" + } + }, + { + "comment": "No need for plone.collection related information.", + "action": "full_remove", + "configuration": { + "section": "behaviors", + "name": "plone.collection" + } + }, + { + "comment": "No need for plone.thumb_icon related information.", + "action": "full_remove", + "configuration": { + "section": "behaviors", + "name": "plone.thumb_icon" + } + }, + { + "comment": "No need for plone.tableofcontents related information.", + "action": "full_remove", + "configuration": { + "section": "behaviors", + "name": "plone.tableofcontents" + } + }, + { + "comment": "No need for plone.layoutaware (Mosaic) layout related.", + "action": "field_remove", + "configuration": { + "section": "behaviors", + "name": "plone.layoutaware", + "field": "contentLayout" + } + }, + { + "comment": "No need for plone.layoutaware (Mosaic) layout related.", + "action": "field_remove", + "configuration": { + "section": "behaviors", + "name": "plone.layoutaware", + "field": "pageSiteLayout" + } + }, + { + "comment": "No need for plone.layoutaware (Mosaic) layout related.", + "action": "field_remove", + "configuration": { + "section": "behaviors", + "name": "plone.layoutaware", + "field": "sectionSiteLayout" + } + } +] \ No newline at end of file diff --git a/example_configuration_opensearch/dev-opensearch/opensearch-configuration/keywords.txt b/example_configuration_opensearch/dev-opensearch/opensearch-configuration/keywords.txt new file mode 100644 index 00000000..ff5bb855 --- /dev/null +++ b/example_configuration_opensearch/dev-opensearch/opensearch-configuration/keywords.txt @@ -0,0 +1,3 @@ +börse +zusammenführen +ük \ No newline at end of file diff --git a/example_configuration_opensearch/dev-opensearch/opensearch-configuration/lexicon.txt b/example_configuration_opensearch/dev-opensearch/opensearch-configuration/lexicon.txt new file mode 100644 index 00000000..1ac92156 --- /dev/null +++ b/example_configuration_opensearch/dev-opensearch/opensearch-configuration/lexicon.txt @@ -0,0 +1,7 @@ +abacus +abbildung +abbruch +abfrage +abgleich +abgrenzung +abhängigkeit \ No newline at end of file