ingest: Ingest API operations

Description Usage Arguments Details Value References Examples

Description

Ingest API operations

Usage

1
2
3
4
5
6
7

Arguments

id

(character) one or more pipeline id's. with delete, you can use a wildcard match

body

body describing pipeline, see examples and Elasticsearch docs

...

Curl args passed on to httr::POST(), httr::GET(), httr::PUT(), or httr::DELETE()

filter_path

(character) fields to return. deafults to all if not given

Details

ingest/pipeline functions available in Elasticsearch v5 and greater

Value

a named list

References

https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-apis.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
## Not run: 
# create
body1 <- '{
  "description" : "do a thing",
  "version" : 123,
  "processors" : [
    {
      "set" : {
        "field": "foo",
        "value": "bar"
      }
    }
  ]
}'
body2 <- '{
  "description" : "do another thing",
  "processors" : [
    {
      "set" : {
        "field": "stuff",
        "value": "things"
      }
    }
  ]
}'
pipeline_create(id = 'foo', body = body1)
pipeline_create(id = 'bar', body = body2)

# get
pipeline_get(id = 'foo')
pipeline_get(id = 'bar')
pipeline_get(id = 'foo', filter_path = "*.version")
pipeline_get(id = c('foo', 'bar')) # get >1

# delete
pipeline_delete(id = 'foo')

# simulate
## with pipeline included
body <- '{
  "pipeline" : {
    "description" : "do another thing",
    "processors" : [
      {
        "set" : {
          "field": "stuff",
          "value": "things"
        }
      }
    ]
  },
  "docs" : [
    { "_source": {"foo": "bar"} },
    { "_source": {"foo": "world"} }
  ]
}'
pipeline_simulate(body)

## referencing existing pipeline
body <- '{
  "docs" : [
    { "_source": {"foo": "bar"} },
    { "_source": {"foo": "world"} }
  ]
}'
pipeline_simulate(body, id = "foo")

## End(Not run)

ropensci/elastic documentation built on Dec. 17, 2018, 11:08 a.m.