Skip to content

[8.7] Adds size parameter to the reindex commands in the NLP examples (backport #2435) #2437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 deletions docs/en/stack/ml/nlp/ml-nlp-inference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ POST _reindex
{
"source": {
"index": "kibana_sample_data_logs",
"size": 500
"size": 50
},
"dest": {
"index": "lang-test",
Expand All @@ -245,9 +245,9 @@ POST _reindex
However, those web log messages are unlikely to contain enough words for the
model to accurately identify the language.

TIP: Set the reindex `size` option to a value
smaller than the `queue_capacity` for the trained model deployment. Otherwise, requests might be rejected
with a "too many requests" 429 error code.
TIP: Set the reindex `size` option to a value smaller than the `queue_capacity`
for the trained model deployment. Otherwise, requests might be rejected with a
"too many requests" 429 error code.

[discrete]
[[ml-nlp-inference-discover]]
Expand Down
6 changes: 5 additions & 1 deletion docs/en/stack/ml/nlp/ml-nlp-ner-example.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,18 @@ you created:
POST _reindex
{
"source": {
"index": "les-miserables"
"index": "les-miserables",
"size": 50 <1>
},
"dest": {
"index": "les-miserables-infer",
"pipeline": "ner"
}
}
--------------------------------------------------
<1> The default batch size for reindexing is 1000. Reducing `size` to a smaller
number makes the update of the reindexing process quicker which enables you to
follow the progress closely and detect errors early.

Take a random paragraph from the source document as an example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,18 @@ ingest processor inserts the embedding vector into each document.
POST _reindex?wait_for_completion=false
{
"source": {
"index": "collection"
"index": "collection",
"size": 50 <1>
},
"dest": {
"index": "collection-with-embeddings",
"pipeline": "text-embeddings"
}
}
--------------------------------------------------
<1> The default batch size for reindexing is 1000. Reducing `size` to a smaller
number makes the update of the reindexing process quicker which enables you to
follow the progress closely and detect errors early.

The API call returns a task ID that can be used to monitor the progress:

Expand Down