Commit graph

88 commits

Author SHA1 Message Date
Lisa Cawley
ebceb76d49
[DOCS] More links to new API site (#119377) (#119418)
(cherry picked from commit ba8beecdb0)
2024-12-31 20:21:46 +00:00
Lisa Cawley
f6a2a991d5
[DOCS] Link to new API site (#119038) (#119360)
Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
2024-12-31 04:18:27 +11:00
Joe Gallo
807d988c9d
Document new ip_location APIs (#116611) (#116615) 2024-11-12 06:24:17 +11:00
Keith Massey
35f7efefd1
Adding support for additional mapping to simulate ingest API (#114742) (#115284) 2024-10-22 08:13:33 -05:00
Keith Massey
37125f265d
Adding index_template_substitutions to the simulate ingest API (#114128) (#114374)
This adds support for a new `index_template_substitutions` field to the
body of an ingest simulate API request. These substitutions can be used
to change the pipeline(s) used for ingest, or to change the mappings
used for validation. It is similar to the
`component_template_substitutions` added in #113276. Here is an example
that shows both of those usages working together:

```
## First, add a couple of pipelines that set a field to a boolean:
PUT /_ingest/pipeline/foo-pipeline?pretty
{
  "processors": [
    {
      "set": {
        "field": "foo",
        "value": true
      }
    }
  ]
}

PUT /_ingest/pipeline/bar-pipeline?pretty
{
  "processors": [
    {
      "set": {
        "field": "bar",
        "value": true
      }
    }
  ]
}

## Now, create three component templates. One provides a mapping enforces that the only field is "foo"
## and that field is a keyword. The next is similar, but adds a `bar` field. The final one provides a setting
## that makes "foo-pipeline" the default pipeline.
## Remember that the "foo-pipeline" sets the "foo" field to a boolean, so using both of these templates
## together would cause a validation exception. These could be in the same template, but are provided
## separately just so that later we can show how multiple templates can be overridden.
PUT _component_template/mappings_template
{
  "template": {
    "mappings": {
      "dynamic": "strict",
      "properties": {
        "foo": {
          "type": "keyword"
        }
      }
    }
  }
}

PUT _component_template/mappings_template_with_bar
{
    "template": {
      "mappings": {
        "dynamic": "strict",
        "properties": {
          "foo": {
            "type": "keyword"
          },
          "bar": {
            "type": "boolean"
          }
        }
      }
    }
}

PUT _component_template/settings_template
{
  "template": {
    "settings": {
      "index": {
        "default_pipeline": "foo-pipeline"
      }
    }
  }
}

## Here we create an index template  pulling in both of the component templates above
PUT _index_template/template_1
{
  "index_patterns": ["foo*"],
  "composed_of": ["mappings_template", "settings_template"]
}

## We can index a document here to create the index, or not. Either way the simulate call ought to work the same
POST foo-1/_doc
{
  "foo": "FOO"
}

## This will not blow up with validation exceptions because the substitute "index_template_substitutions"
## uses `mappings_template_with_bar`, which adds the bar field.
## And the bar-pipeline is executed rather than the foo-pipeline because the substitute
## "index_template_substitutions" uses a substitute `settings_template`, so the value of "foo"
## does not get set to an invalid type.
POST _ingest/_simulate?pretty&index=foo-1
{
  "docs": [
    {
      "_id": "asdf",
      "_source": {
        "foo": "foo",
        "bar": "bar"
      }
    }
  ],
  "component_template_substitutions": {
    "settings_template": {
      "template": {
        "settings": {
          "index": {
            "default_pipeline": "bar-pipeline"
          }
        }
      }
    }
  },
  "index_template_substitutions": {
    "template_1": {
      "index_patterns": ["foo*"],
      "composed_of": ["mappings_template_with_bar", "settings_template"]
    }
  }
}
```
2024-10-09 13:04:23 +11:00
Keith Massey
7870e2dbe2
Adding component template substitutions to the simulate ingest API (#113276) (#113567) 2024-09-26 07:32:13 +10:00
Keith Massey
4aa3c3d7ee
Add support for templates when validating mappings in the simulate ingest API (#111161) 2024-09-05 09:25:53 -05:00
Keith Massey
c6a7537df7
Ingest download databases docs (#111688)
Co-authored-by: Joe Gallo <joegallo@gmail.com>
2024-08-08 09:23:56 -05:00
Niels Bauman
86727a8741
Add size_in_bytes to enrich cache stats (#110578)
As preparation for #106081, this PR adds the `size_in_bytes`
field to the enrich cache. This field is calculated by summing
the ByteReference sizes of all the search hits in the cache.
It's not a perfect representation of the size of the enrich cache
on the heap, but some experimentation showed that it's quite close.
2024-07-12 08:53:53 +02:00
Keith Massey
bcd62e8d03
Adding hits_time_in_millis and misses_time_in_millis to enrich cache stats (#107579) 2024-04-18 15:19:24 -05:00
Keith Massey
8adc2926a2
Fixed the spelling of the word successful in docs (#107595) 2024-04-18 08:08:30 -05:00
Liam Thompson
33a71e3289
[DOCS] Refactor book-scoped variables in docs/reference/index.asciidoc (#107413)
* Remove `es-test-dir` book-scoped variable

* Remove `plugins-examples-dir` book-scoped variable

* Remove `:dependencies-dir:` and `:xes-repo-dir:` book-scoped variables

- In `index.asciidoc`, two variables (`:dependencies-dir:` and `:xes-repo-dir:`) were removed.
- In `sql/index.asciidoc`, the `:sql-tests:` path was updated to fuller path
- In `esql/index.asciidoc`, the `:esql-tests:` path was updated idem

* Replace `es-repo-dir` with `es-ref-dir`

* Move `:include-xpack: true` to few files that use it, remove from index.asciidoc
2024-04-17 14:37:07 +02:00
Keith Massey
f5c7938ab8
Adding cache_stats to geoip stats API (#107334) 2024-04-16 16:57:14 -05:00
Keith Massey
48a88c575c
Renaming GeoIpDownloaderStatsAction (#107290)
Renaming GeoIpDownloaderStatsAction to GeoIpStatsAction
2024-04-10 09:21:24 -05:00
Abdon Pijpelink
ac973f0064
[DOCS] Improve enrich policy execute 'wait_for_completion' docs (#102291)
* [DOCS] Improve enrich policy execute 'wait_for_completion' docs

* Update docs/reference/ingest/apis/enrich/execute-enrich-policy.asciidoc

Co-authored-by: James Rodewig <james.rodewig@elastic.co>

---------

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2023-11-27 17:17:06 +01:00
Keith Massey
643d825c45
Adding a simulate ingest api (#101409)
This commit introduces a new _ingest/simulate API that runs any pipelines
on the given data that would be executed for a given index, but instead of
indexing the data into the index, returns the transformed documents and
the list of pipelines that were executed.
2023-11-15 17:25:09 -06:00
Felix Barnsteiner
978a5469ce
Add support for marking component templates as deprecated (#101148) 2023-11-02 19:28:20 +01:00
Felix Barnsteiner
75d9bd7790
Rename component templates and pipelines according to the new naming conventions (#99975)
- Creates a new StackTemplateRegistry that uses the new names
- The new registry only respects stack.templates.enabled for index templates
- Renames the old registry to LegacyStackTemplateRegistry
- Component templates are not duplicated but registered under two different names
- Documents the new naming convention
- Index templates are not renamed, at least for now, as there are some challenges with it
  See 7fd0423 for more details.
2023-10-25 11:56:28 +02:00
Abdon Pijpelink
fcdeb21993
[DOCS] Expand ES|QL ENRICH documentation (#101079)
* [DOCS] Expand ES|QL ENRICH documentation

* Add examples to 'Enrich data' page

* Add another diagram

* Remove redirect that's no longer needed

* Review feedback
2023-10-19 17:14:21 +02:00
Stuart Tettemer
d42211c431
Ingest: IngestDocument requires non-null version (#87665)
Changes the type of the version parameter in `IngestDocument` from
`Long` to `long` and moves it to the third argument, so all required
values occur before nullable arguments.

The `IngestService` expects a non-null version for a document and will
throw an `NullPointerException` if one is not provided.

Related: #87309
2022-06-15 07:50:45 -05:00
Jan Doberstein
73b3d8f639
Update execute-enrich-policy.asciidoc (#80750)
Changed the wording, as the execution of the policy does not trigger the delete. That delete is done periodical and can be configured with the `enrich.cleanup_period` 

https://www.elastic.co/guide/en/elasticsearch/reference/7.16/enrich-setup.html#ingest-enrich-settings
2021-11-16 11:57:04 +01:00
James Rodewig
f56a0f4b66
[DOCS] Remove testenv annotations from doc snippet tests (#80023)
Removes `testenv` annotations and related code. These annotations originally let you skip x-pack snippet tests in the docs. However, that's no longer possible.

Relates to #79309, #31619
2021-11-05 18:38:50 -04:00
Michael Bischoff
c30ab868ee
[DOCS] Document range enrich policy (#79607)
Adding docs for the range enrich policy

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-10-26 15:15:53 +02:00
Dan Hermann
a23f58f809
[DOCS] if_version parameter for OCC on pipeline updates (#79640) 2021-10-25 08:25:26 -05:00
Martijn van Groningen
1ae4f3c937
Add enrich node cache (#76800)
Introduce a LRU cache to avoid searches that occur frequently
from the enrich processor.

Relates to #48988
2021-09-03 09:33:44 +02:00
Francois-Clement Brossard
ec11f9f931
Execute enrich policy wait_for_completion docfix (#77046) 2021-08-31 14:02:24 -04:00
James Rodewig
c238296b7a
[DOCS] Add missing timeout param to create pipeline API docs (#76432) 2021-08-12 14:32:34 -04:00
Keith Massey
498684a696
Add support for _meta field to ingest pipelines (#75905)
We are adding a _meta field to many of our REST APIs so that users can attach whatever metadata they
want. The data in this field will not be used by Elasticsearch. This commit add the _meta field to ingest
pipelines.
2021-08-11 08:30:36 -05:00
James Rodewig
c277110a14
[DOCS] Merge ingest APIs index to one page (#76264)
Adds some `discrete` tags to merge the ingest APIs index into a single
page.
2021-08-10 09:30:47 -04:00
Przemko Robakowski
9706d676a1
Enable GeoIP downloader by default (#74323)
This change will enable geoip downloader by default again. It also brings back relevant documentation.
2021-06-28 09:04:49 +02:00
Yang Cheng
98a6ef9ee3
[DOCS] Add missingxpack role (#74331) 2021-06-21 10:01:35 -04:00
Przemko Robakowski
a7ff5e7141
Disable GeoIP downloader (#72716)
Due to problems discovered in #72572 we have to disable geoip downloader for now. We use ingest.geoip.downloader.enabled.default as feature flag.
This change also reverts changes to docs.
2021-05-10 13:03:30 +02:00
Przemko Robakowski
308aee283d
Update GeoIP processor documentation (#71211)
This PR adds documentation for GeoIPv2 auto-update feature.
It also changes related settings names from geoip.downloader.* to ingest.geoip.downloader to have the same convention as current setting.

Relates to #68920

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-04-15 13:47:09 +02:00
James Rodewig
0f3d53b517 [DOCS] Fix create enrich policy API title 2021-04-08 17:53:27 -04:00
James Rodewig
3d172da8dd
[DOCS] Fix create enrich policy API title (#71494) 2021-04-08 15:35:53 -04:00
James Rodewig
fa93666b6a
[DOCS] Document ingest processor description (#70899) 2021-03-26 09:42:46 -04:00
James Rodewig
48f0ae6509 [DOCS] Add newline to end of file 2021-03-25 09:33:59 -04:00
James Rodewig
224bf7943a
[DOCS] Move enrich policy object def to API docs (#70825) 2021-03-25 09:17:41 -04:00
James Rodewig
deb4805779
[DOCS] Fix simulate pipeline API's request parameter docs (#70678) 2021-03-23 09:40:17 -04:00
James Rodewig
d7144dedf8
[DOCS] Document on_failure param for create pipeline API (#70679) 2021-03-23 09:22:34 -04:00
James Rodewig
026c02b1ee
[DOCS] Add additional example to ingest pipeline docs (#70677) 2021-03-23 07:54:41 -04:00
James Rodewig
08c3bb6e8a [DOCS] Fix heading in create ingest pipeline API docs 2021-03-22 14:06:14 -04:00
James Rodewig
b65992ede5 [DOCS] Streamline create pipeline API parameter defs 2021-03-22 13:00:48 -04:00
James Rodewig
5c75d004fa
[DOCS] Replace put with create or update in API names (#70330)
Co-authored-by: debadair <debadair@elastic.co>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-03-15 14:49:44 -04:00
James Rodewig
010a973018
[DOCS] Refactor ingest pipeline docs (#70253) 2021-03-15 12:22:57 -04:00
James Rodewig
6ed537868a
[DOCS] Add security privileges to ingest API docs (#67845) 2021-01-25 08:41:46 -05:00
James Rodewig
cb3e0051e0
[DOCS] Make cat API verbose query param explicit (#67300) 2021-01-11 17:19:23 -05:00
James Rodewig
cb26c542ce
[DOCS] Document get pipeline API as multi-target (#64816) 2020-11-09 16:11:13 -05:00
James Rodewig
1ea83359bb
[DOCS] Fix case for 'Boolean' (#64299) 2020-10-29 09:04:43 -04:00
Jake Landis
35fc997943
Enhance the ingest node simulate verbose output (#60433)
This commit enhances the verbose output for the
`_ingest/pipeline/_simulate?verbose` api. Specifically
this adds the following:

* the pipeline processor is now included in the output
* the conditional (if) and result is now included in the output iff it was defined
* a status field is always displayed. the possible values of status are
  * `success` - if the processor ran with out errors
  * `error` - if the processor ran but threw an error that was not ingored
  * `error_ignored` - if the processor ran but threw an error that was ingored
  * `skipped` - if the process did not run (currently only possible if the if condition evaluates to false)
  * `dropped` - if the the `drop` processor ran and dropped the document
* a `processor_type` field for the type of processor (e.g. set, rename, etc.)
* throw a better error if trying to simulate with a pipeline that does not exist

closes #56004
2020-08-04 13:09:08 -05:00