mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-05 20:48:22 +00:00
4b1c116461
Adds infrastructure so `gradle :docs:check` will extract tests from snippets in the documentation and execute the tests. This is included in `gradle check` so it should happen on CI and during a normal build. By default each `// AUTOSENSE` snippet creates a unique REST test. These tests are executed in a random order and the cluster is wiped between each one. If multiple snippets chain together into a test you can annotate all snippets after the first with `// TEST[continued]` to have the generated tests for both snippets joined. Snippets marked as `// TESTRESPONSE` are checked against the response of the last action. See docs/README.asciidoc for lots more. Closes #12583. That issue is about catching bugs in the docs during build. This catches *some* bugs in the docs during build which is a good start.
41 lines
1.5 KiB
Plaintext
41 lines
1.5 KiB
Plaintext
[[ingest]]
|
|
= Ingest Node
|
|
|
|
[partintro]
|
|
--
|
|
You can use ingest node to pre-process documents before the actual indexing takes place.
|
|
This pre-processing happens by an ingest node that intercepts bulk and index requests, applies the
|
|
transformations, and then passes the documents back to the index or bulk APIs.
|
|
|
|
You can enable ingest on any node or even have dedicated ingest nodes. Ingest is enabled by default
|
|
on all nodes. To disable ingest on a node, configure the following setting in the `elasticsearch.yml` file:
|
|
|
|
[source,yaml]
|
|
--------------------------------------------------
|
|
node.ingest: false
|
|
--------------------------------------------------
|
|
|
|
To pre-process documents before indexing, you <<pipeline,define a pipeline>> that specifies
|
|
a series of <<ingest-processors,processors>>. Each processor transforms the document in some way.
|
|
For example, you may have a pipeline that consists of one processor that removes a field from
|
|
the document followed by another processor that renames a field.
|
|
|
|
To use a pipeline, you simply specify the `pipeline` parameter on an index or bulk request to
|
|
tell the ingest node which pipeline to use. For example:
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
PUT my-index/my-type/my-id?pipeline=my_pipeline_id
|
|
{
|
|
"foo": "bar"
|
|
}
|
|
--------------------------------------------------
|
|
// AUTOSENSE
|
|
// TEST[catch:request]
|
|
|
|
See <<ingest-apis,Ingest APIs>> for more information about creating, adding, and deleting pipelines.
|
|
|
|
--
|
|
|
|
include::ingest/ingest-node.asciidoc[]
|