diff --git a/docs/_src/api/api/other.md b/docs/_src/api/api/other.md index c7c0098a0..0c3d598d5 100644 --- a/docs/_src/api/api/other.md +++ b/docs/_src/api/api/other.md @@ -110,7 +110,7 @@ def __init__(split_by: str = "content_type", metadata_values: Optional[List[str] - `split_by`: Field to split the documents by, either `"content_type"` or a metadata field name. If this parameter is set to `"content_type"`, the list of `Document`s will be split into a list containing only `Document`s of type `"text"` (will be routed to `"output_1"`) and a list containing only `Document`s of -type `"text"` (will be routed to `"output_2"`). +type `"table"` (will be routed to `"output_2"`). If this parameter is set to a metadata field name, you need to specify the parameter `metadata_values` as well. - `metadata_values`: If the parameter `split_by` is set to a metadata field name, you need to provide a list diff --git a/docs/_src/tutorials/tutorials/15.md b/docs/_src/tutorials/tutorials/15.md index 56504aa21..5a79daf40 100644 --- a/docs/_src/tutorials/tutorials/15.md +++ b/docs/_src/tutorials/tutorials/15.md @@ -266,7 +266,7 @@ document_store.update_embeddings(retriever=retriever, update_existing_embeddings We are using one node for retrieving both texts and tables, the `TableTextRetriever`. In order to do question-answering on the Documents coming from the `TableTextRetriever`, we need to route Documents of type `"text"` to a `FARMReader` (or alternatively `TransformersReader`) and Documents of type `"table"` to a `TableReader`. To achieve this, we make use of two additional nodes: -- `SplitDocumentList`: Splits the List of Documents retrieved by the `TableTextRetriever` into two lists containing only Documents of type `"text"` or `"table"`, respectively. +- `RouteDocuments`: Splits the List of Documents retrieved by the `TableTextRetriever` into two lists containing only Documents of type `"text"` or `"table"`, respectively. - `JoinAnswers`: Takes Answers coming from two different Readers (in this case `FARMReader` and `TableReader`) and joins them to a single list of Answers. diff --git a/haystack/nodes/other/route_documents.py b/haystack/nodes/other/route_documents.py index 81fd67c9f..df2c0af87 100644 --- a/haystack/nodes/other/route_documents.py +++ b/haystack/nodes/other/route_documents.py @@ -18,7 +18,7 @@ class RouteDocuments(BaseComponent): :param split_by: Field to split the documents by, either `"content_type"` or a metadata field name. If this parameter is set to `"content_type"`, the list of `Document`s will be split into a list containing only `Document`s of type `"text"` (will be routed to `"output_1"`) and a list containing only `Document`s of - type `"text"` (will be routed to `"output_2"`). + type `"table"` (will be routed to `"output_2"`). If this parameter is set to a metadata field name, you need to specify the parameter `metadata_values` as well. :param metadata_values: If the parameter `split_by` is set to a metadata field name, you need to provide a list diff --git a/tutorials/Tutorial15_TableQA.ipynb b/tutorials/Tutorial15_TableQA.ipynb index 5df021fb2..52f16a293 100644 --- a/tutorials/Tutorial15_TableQA.ipynb +++ b/tutorials/Tutorial15_TableQA.ipynb @@ -1887,7 +1887,7 @@ "We are using one node for retrieving both texts and tables, the `TableTextRetriever`. In order to do question-answering on the Documents coming from the `TableTextRetriever`, we need to route Documents of type `\"text\"` to a `FARMReader` (or alternatively `TransformersReader`) and Documents of type `\"table\"` to a `TableReader`.\n", "\n", "To achieve this, we make use of two additional nodes:\n", - "- `SplitDocumentList`: Splits the List of Documents retrieved by the `TableTextRetriever` into two lists containing only Documents of type `\"text\"` or `\"table\"`, respectively.\n", + "- `RouteDocuments`: Splits the List of Documents retrieved by the `TableTextRetriever` into two lists containing only Documents of type `\"text\"` or `\"table\"`, respectively.\n", "- `JoinAnswers`: Takes Answers coming from two different Readers (in this case `FARMReader` and `TableReader`) and joins them to a single list of Answers." ] },