Repository: deepset-ai/haystack

Issue:
search_fields not accepting array values in pipelines.yaml for ElasticsearchDocumentStore
**Describe the bug**
I am trying to set up two _search_fields_ for my ES retriever, but if I set up more than one I am having this issue

Here is the .yaml part we are interested in : 
```yaml
components:    
  - name: ElasticsearchDocumentStore
    type: ElasticsearchDocumentStore
    params:
      host: elasticsearch
      index: document_elasticsearch
      embedding_dim: 512
      search_fields: [text,name]  # this doesn't work, while only text works
      create_index: False
      embedding_field: emb
      similarity: cosine
```

**Error message**
```bash
haystack-api     | 04/06/2021 15:43:57 - INFO - faiss.loader -   Loading faiss with AVX2 support.
haystack-api     | 04/06/2021 15:43:57 - INFO - faiss.loader -   Loading faiss.
haystack-api     | 04/06/2021 15:43:58 - INFO - farm.modeling.prediction_head -   Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex .
haystack-api     | pdftotext version 4.03 [www.xpdfreader.com]
haystack-api     | Copyright 1996-2021 Glyph & Cog, LLC
haystack-api     | Traceback (most recent call last):
haystack-api     |   File "/home/user/haystack/pipeline.py", line 263, in _load_or_get_component
haystack-api     |     if value in definitions.keys():  # check if the param value is a reference to another component.
haystack-api     | TypeError: unhashable type: 'list'
haystack-api     |
haystack-api     | During handling of the above exception, another exception occurred:
haystack-api     |
haystack-api     | Traceback (most recent call last):
haystack-api     |   File "/usr/local/bin/gunicorn", line 8, in <module>
haystack-api     |     sys.exit(run())
haystack-api     |   File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
haystack-api     |     WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
haystack-api     |   File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 231, in run
haystack-api     |     super().run()
haystack-api     |   File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 72, in run
haystack-api     |     Arbiter(self).run()
haystack-api     |   File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 58, in __init__
haystack-api     |     self.setup(app)
haystack-api     |   File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 118, in setup
haystack-api     |     self.app.wsgi()
haystack-api     |   File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
haystack-api     |     self.callable = self.load()
haystack-api     |   File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
haystack-api     |     return self.load_wsgiapp()
haystack-api     |   File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
haystack-api     |     return util.import_app(self.app_uri)
haystack-api     |   File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 359, in import_app
haystack-api     |     mod = importlib.import_module(module)
haystack-api     |   File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
haystack-api     |     return _bootstrap._gcd_import(name[level:], package, level)
haystack-api     |   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
haystack-api     |   File "<frozen importlib._bootstrap>", line 983, in _find_and_load
haystack-api     |   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
haystack-api     |   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
haystack-api     |   File "<frozen importlib._bootstrap_external>", line 728, in exec_module
haystack-api     |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
haystack-api     |   File "/home/user/rest_api/application.py", line 8, in <module>
haystack-api     |     from rest_api.controller.router import router as api_router
haystack-api     |   File "/home/user/rest_api/controller/router.py", line 3, in <module>
haystack-api     |     from rest_api.controller import file_upload, search, feedback
haystack-api     |   File "/home/user/rest_api/controller/file_upload.py", line 18, in <module>
haystack-api     |     INDEXING_PIPELINE = Pipeline.load_from_yaml(Path(PIPELINE_YAML_PATH), pipeline_name=INDEXING_PIPELINE_NAME)
haystack-api     |   File "/home/user/haystack/pipeline.py", line 238, in load_from_yaml
haystack-api     |     component = cls._load_or_get_component(name=name, definitions=definitions, components=components)
haystack-api     |   File "/home/user/haystack/pipeline.py", line 271, in _load_or_get_component
haystack-api     |     raise Exception(f"Failed loading pipeline component '{name}': {e}")
haystack-api     | Exception: Failed loading pipeline component 'ElasticsearchDocumentStore': unhashable type: 'list'
```

**Expected behavior**
It should be working like a charm :) just like it does when `search_fields = text`

**Additional context**
I am using the REST API with `docker-compose up` command to launch the project

**reproduce**
in pipelines.yaml write
```yaml
      search_fields: [text,name]
```

**System:**
 - OS: MacOS
 - GPU/CPU: CPU
 - Haystack version (commit or version number): 0.7.0
 - DocumentStore: Elasticsearch
 - Reader: etalab-ia/camembert-base-squadFR-fquad-piaf
 - Retriever: ElasticsearchRetriever



Discussion:

Resolving patch:
diff --git a/haystack/pipeline.py b/haystack/pipeline.py
--- a/haystack/pipeline.py
+++ b/haystack/pipeline.py
@@ -259,7 +259,7 @@ def _load_or_get_component(cls, name: str, definitions: dict, components: dict):
             for key, value in component_params.items():
                 # Component params can reference to other components. For instance, a Retriever can reference a
                 # DocumentStore defined in the YAML. All references should be recursively resolved.
-                if value in definitions.keys():  # check if the param value is a reference to another component.
+                if isinstance(value, str) and value in definitions.keys():  # check if the param value is a reference to another component.
                     if value not in components.keys():  # check if the referenced component is already loaded.
                         cls._load_or_get_component(name=value, definitions=definitions, components=components)
                     component_params[key] = components[value]  # substitute reference (string) with the component object.


Test patch: