"Fossies" - the Fresh Open Source Software Archive 
Member "elasticsearch-6.8.23/modules/ingest-common/src/test/resources/rest-api-spec/test/ingest/100_date_index_name_processor.yml" (29 Dec 2021, 2117 Bytes) of package /linux/www/elasticsearch-6.8.23-src.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ansible YAML source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 ---
2 teardown:
3 - do:
4 ingest.delete_pipeline:
5 id: "1"
6 ignore: 404
7
8 ---
9 "Test date index name processor with defaults":
10 - do:
11 ingest.put_pipeline:
12 id: "1"
13 body: >
14 {
15 "processors": [
16 {
17 "date_index_name" : {
18 "field" : "date",
19 "index_name_prefix": "events-",
20 "date_rounding": "d"
21 }
22 }
23 ]
24 }
25 - match: { acknowledged: true }
26
27 - do:
28 index:
29 index: events
30 type: event
31 id: 1
32 pipeline: "1"
33 body: {
34 date: "2016-04-22T16:32:14.968Z"
35 }
36 - match: { _index: "events-2016-04-22"}
37
38 ---
39 "Test date index name processor with joda pattern":
40 - do:
41 ingest.put_pipeline:
42 id: "1"
43 body: >
44 {
45 "processors": [
46 {
47 "date_index_name" : {
48 "field": "date",
49 "date_rounding": "d",
50 "index_name_prefix": "prefix-",
51 "index_name_format": "xxxx-w"
52 }
53 }
54 ]
55 }
56 - match: { acknowledged: true }
57
58 - do:
59 index:
60 index: test
61 type: _doc
62 id: 1
63 pipeline: "1"
64 body: {
65 date: "2020-08-10T01:01:01.000Z"
66 }
67 - match: { _index: "prefix-2020-33"}
68
69
70 ---
71 "Test date index name processor with java pattern":
72 - do:
73 ingest.put_pipeline:
74 id: "1"
75 body: >
76 {
77 "processors": [
78 {
79 "date_index_name" : {
80 "field": "date",
81 "date_rounding": "d",
82 "index_name_prefix": "prefix-",
83 "index_name_format": "8YYYY-w"
84 }
85 }
86 ]
87 }
88 - match: { acknowledged: true }
89
90 - do:
91 index:
92 index: test
93 type: _doc
94 id: 1
95 pipeline: "1"
96 body: {
97 date: "2020-08-10T01:01:01.000Z"
98 }
99 - match: { _index: "prefix-2020-33"}