From 99a83964c2f3262488119308f8b10bf605040317 Mon Sep 17 00:00:00 2001 From: Samiul Monir <150824886+Samiul-TheSoccerFan@users.noreply.github.com> Date: Tue, 1 Apr 2025 12:15:58 -0600 Subject: [PATCH] Update documentation to highlight that copy_to is not required (#436) --- notebooks/search/09-semantic-text.ipynb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/notebooks/search/09-semantic-text.ipynb b/notebooks/search/09-semantic-text.ipynb index 390ee2fa0..085c322e7 100644 --- a/notebooks/search/09-semantic-text.ipynb +++ b/notebooks/search/09-semantic-text.ipynb @@ -400,7 +400,9 @@ "source": [ "Notice how we configured the mappings. We defined `plot_semantic` as a `semantic_text` field.\n", "The `inference_id` parameter defines the inference endpoint that is used to generate the embeddings for the field.\n", - "Then we configured the `plot` field to [copy its value](https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html) to the `plot_semantic` field." + "Then we configured the `plot` field to [copy its value](https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html) to the `plot_semantic` field.\n", + "\n", + "While `copy_to` is not required to use `semantic_text`, it enables use cases like hybrid search where semantic and lexical techniques are used together. We will cover a hybrid search example later in this notebook." ] }, { @@ -613,6 +615,8 @@ "These results demonstrate that the application of lexical search techniques can help focus the results, while retaining many of the advantages of semantic search.\n", "In this example, the top search results are all still movies involving organized crime, but the `multi_match` query keeps the long tail shorter and focused on movies in the crime genre.\n", "\n", + "The `copy_to` parameter we defined in the mapping enables this query pattern. It ensures that the content provided for the `plot` field is indexed both lexically and semantically.\n", + "\n", "Note the `boost` parameters applied to the `multi_match` and `semantic` queries.\n", "Combining lexical and semantic search techniques in a boolean query like this is called \"linear combination\" and when doing this, it is important to normalize the scores of the component queries.\n", "This involves consideration of a few factors, including:\n",