You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/search/search-your-data/semantic-search-semantic-text.asciidoc
+21-30Lines changed: 21 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,24 +59,18 @@ If using the Python client, you can set the `timeout` parameter to a higher valu
59
59
[[semantic-text-index-mapping]]
60
60
==== Create the index mapping
61
61
62
-
The mapping of the destination index - the index that contains the embeddings
63
-
that the inference endpoint will generate based on your input text - must be created. The
64
-
destination index must have a field with the <<semantic-text,`semantic_text`>>
65
-
field type to index the output of the used inference endpoint.
62
+
The mapping of the destination index - the index that contains the embeddings that the inference endpoint will generate based on your input text - must be created.
63
+
The destination index must have a field with the <<semantic-text,`semantic_text`>> field type to index the output of the used inference endpoint.
"query": "How to avoid muscle soreness while running?" <2>
180
166
}
181
167
}
@@ -196,7 +182,7 @@ query from the `semantic-embedding` index:
196
182
"_id": "6DdEuo8B0vYIvzmhoEtt",
197
183
"_score": 24.972616,
198
184
"_source": {
199
-
"semantic_text": {
185
+
"content": {
200
186
"inference": {
201
187
"inference_id": "my-elser-endpoint",
202
188
"model_settings": {
@@ -213,15 +199,15 @@ query from the `semantic-embedding` index:
213
199
}
214
200
},
215
201
"id": 1713868,
216
-
"content": "There are a few foods and food groups that will help to fight inflammation and delayed onset muscle soreness (both things that are inevitable after a long, hard workout) when you incorporate them into your postworkout eats, whether immediately after your run or at a meal later in the day. Advertisement. Advertisement."
202
+
"text": "There are a few foods and food groups that will help to fight inflammation and delayed onset muscle soreness (both things that are inevitable after a long, hard workout) when you incorporate them into your postworkout eats, whether immediately after your run or at a meal later in the day. Advertisement. Advertisement."
217
203
}
218
204
},
219
205
{
220
206
"_index": "semantic-embeddings",
221
207
"_id": "-zdEuo8B0vYIvzmhplLX",
222
208
"_score": 22.143118,
223
209
"_source": {
224
-
"semantic_text": {
210
+
"content": {
225
211
"inference": {
226
212
"inference_id": "my-elser-endpoint",
227
213
"model_settings": {
@@ -238,15 +224,15 @@ query from the `semantic-embedding` index:
238
224
}
239
225
},
240
226
"id": 3389244,
241
-
"content": "During Your Workout. There are a few things you can do during your workout to help prevent muscle injury and soreness. According to personal trainer and writer for Iron Magazine, Marc David, doing warm-ups and cool-downs between sets can help keep muscle soreness to a minimum."
227
+
"text": "During Your Workout. There are a few things you can do during your workout to help prevent muscle injury and soreness. According to personal trainer and writer for Iron Magazine, Marc David, doing warm-ups and cool-downs between sets can help keep muscle soreness to a minimum."
242
228
}
243
229
},
244
230
{
245
231
"_index": "semantic-embeddings",
246
232
"_id": "77JEuo8BdmhTuQdXtQWt",
247
233
"_score": 21.506052,
248
234
"_source": {
249
-
"semantic_text": {
235
+
"content": {
250
236
"inference": {
251
237
"inference_id": "my-elser-endpoint",
252
238
"model_settings": {
@@ -263,11 +249,16 @@ query from the `semantic-embedding` index:
263
249
}
264
250
},
265
251
"id": 363742,
266
-
"content": "This is especially important if the soreness is due to a weightlifting routine. For this time period, do not exert more than around 50% of the level of effort (weight, distance and speed) that caused the muscle groups to be sore."
252
+
"text": "This is especially important if the soreness is due to a weightlifting routine. For this time period, do not exert more than around 50% of the level of effort (weight, distance and speed) that caused the muscle groups to be sore."
If you want to use `semantic_text` in hybrid search, refer to https://colab.research.google.com/github/elastic/elasticsearch-labs/blob/main/notebooks/search/09-semantic-text.ipynb[this notebook] for a step-by-step guide.
0 commit comments