diff --git a/haystack/pipelines/config.py b/haystack/pipelines/config.py index 8e1345a11..a423171d7 100644 --- a/haystack/pipelines/config.py +++ b/haystack/pipelines/config.py @@ -21,7 +21,7 @@ from haystack.errors import PipelineError, PipelineConfigError, PipelineSchemaEr logger = logging.getLogger(__name__) -VALID_INPUT_REGEX = re.compile(r"^[-a-zA-Z0-9_/\\.:]+$") +VALID_INPUT_REGEX = re.compile(r"^[-a-zA-Z0-9_/\\.:*]+$") VALID_ROOT_NODES = ["Query", "File"] @@ -97,10 +97,7 @@ def read_pipeline_config_from_yaml(path: Path) -> Dict[str, Any]: return yaml.safe_load(stream) -JSON_FIELDS = [ - "custom_query", # ElasticsearchDocumentStore.custom_query - "custom_mapping", # ElasticsearchDocumentStore.custom_mapping -] +JSON_FIELDS = ["custom_query"] # ElasticsearchDocumentStore.custom_query def validate_config_strings(pipeline_config: Any): diff --git a/test/pipelines/test_pipeline.py b/test/pipelines/test_pipeline.py index 2f29e8b62..0d3e09eab 100644 --- a/test/pipelines/test_pipeline.py +++ b/test/pipelines/test_pipeline.py @@ -687,9 +687,6 @@ def test_validate_pipeline_config_component_with_json_input_valid(): validate_config_strings( {"components": [{"name": "test", "type": "test", "params": {"custom_query": '{"json-key": "json-value"}'}}]} ) - validate_config_strings( - {"components": [{"name": "test", "type": "test", "params": {"custom_mapping": '{"json-key": "json-value"}'}}]} - ) def test_validate_pipeline_config_component_with_json_input_invalid_key():