Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Create an {infer} endpoint by using the <<put-inference-api>>:

include::{es-ref-dir}/tab-widgets/inference-api/infer-api-task-widget.asciidoc[]


[discrete]
[[infer-service-mappings]]
==== Create the index mapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ If using the Python client, you can set the `timeout` parameter to a higher valu
[[semantic-text-index-mapping]]
==== Create the index mapping

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. The
destination index must have a field with the <<semantic-text,`semantic_text`>>
field type to index the output of the used inference endpoint.
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.
The destination index must have a field with the <<semantic-text,`semantic_text`>> field type to index the output of the used inference endpoint.

[source,console]
------------------------------------------------------------
Expand Down Expand Up @@ -91,6 +89,9 @@ Every time you ingest data into the related `semantic_text` field, this endpoint
<4> The field to store the text reindexed from a source index in the <<semantic-text-reindex-data,Reindex the data>> step.
<5> The textual data stored in the `content` field will be copied to `semantic_text` and processed by the {infer} endpoint.
The `semantic_text` field will store the embeddings generated based on the input data.
Copying the `content` field content to the `semantic_text` field is not required for using `semantic_text`.
However, it is recommended because it makes it possible to perform hybrid search during which you perform lexical search on the text field and semantic search on the semantic_text field.



[discrete]
Expand Down Expand Up @@ -124,6 +125,11 @@ parameter set in the index mapping creation step. The copied data will be
processed by the {infer} endpoint associated with the `semantic_text` semantic text
field.

IMPORTANT: Using `copy_to` fields is not required for performing semantic search.
You can target the `semantic_text` field directly during ingestion.
Using the `copy_to` field, however, makes it possible to perform hybrid search, hence it is recommended.
To learn more about using the `copy_to` field, refer to <<copy-to-support,this section>> on the `semantic_text` documentation page.

[source,console]
------------------------------------------------------------
POST _reindex?wait_for_completion=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ is the unique identifier of the {infer} endpoint is `elser_embeddings`.
You don't need to download and deploy the ELSER model upfront, the API request
above will download the model if it's not downloaded yet and then deploy it.

[NOTE]
====
You might see a 502 bad gateway error in the response when using the {kib} Console.
This error usually just reflects a timeout, while the model downloads in the background.
You can check the download progress in the {ml-app} UI.
If using the Python client, you can set the `timeout` parameter to a higher value.
====

// end::elser[]

// tag::hugging-face[]
Expand Down
Loading