Skip to content

Commit d2b56fa

Browse files
committed
Restore page accidentally updated with test
1 parent 138a972 commit d2b56fa

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

solutions/search/semantic-search/semantic-search-semantic-text.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,20 @@ POST _tasks/<task_id>/_cancel
103103

104104
After the data set has been enriched with the embeddings, you can query the data using semantic search. Provide the `semantic_text` field name and the query text in a `semantic` query type. The {{infer}} endpoint used to generate the embeddings for the `semantic_text` field will be used to process the query text.
105105

106-
```esql
107-
POST /_query?format=txt
106+
```console
107+
GET semantic-embeddings/_search
108108
{
109-
"query": """
110-
FROM semantic-embeddings search.
111-
| WHERE content: "How to avoid muscle soreness while running?" <1><2>
112-
| LIMIT 1000
113-
"""
109+
"query": {
110+
"semantic": {
111+
"field": "content", <1>
112+
"query": "How to avoid muscle soreness while running?" <2>
113+
}
114+
}
114115
}
115116
```
116-
1. `content` = The name of the `semantic_text` field that contains the embeddings.
117-
2. `:` The name of the `semantic_text` field that contains the embeddings.
118117

119-
# The query text.
118+
1. The `semantic_text` field on which you want to perform the search.
119+
2. The query text.
120120

121121

122122
As a result, you receive the top 10 documents that are closest in meaning to the query from the `semantic-embedding` index.
@@ -126,4 +126,4 @@ As a result, you receive the top 10 documents that are closest in meaning to the
126126

127127
* If you want to use `semantic_text` in hybrid search, refer to [this notebook](https://colab.research.google.com/github/elastic/elasticsearch-labs/blob/main/notebooks/search/09-semantic-text.ipynb) for a step-by-step guide.
128128
* For more information on how to optimize your ELSER endpoints, refer to [the ELSER recommendations](/explore-analyze/machine-learning/nlp/ml-nlp-elser.md#elser-recommendations) section in the model documentation.
129-
* To learn more about model autoscaling, refer to the [trained model autoscaling](../../../deploy-manage/autoscaling/trained-model-autoscaling.md) page.
129+
* To learn more about model autoscaling, refer to the [trained model autoscaling](../../../deploy-manage/autoscaling/trained-model-autoscaling.md) page.

0 commit comments

Comments
 (0)