File tree Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Elasticsearch \Endpoints \Ingest \Pipeline ;
4
+
5
+ use Elasticsearch \Common \Exceptions ;
6
+ use Elasticsearch \Endpoints \AbstractEndpoint ;
7
+
8
+ /**
9
+ * Class ProcessorGrok
10
+ *
11
+ * @category Elasticsearch
12
+ * @package Elasticsearch\Endpoints\Ingest
13
+ * @author Zachary Tong <[email protected] >
14
+ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
15
+ * @link http://elastic.co
16
+ */
17
+ class ProcessorGrok extends AbstractEndpoint
18
+ {
19
+ /**
20
+ * @throws \Elasticsearch\Common\Exceptions\RuntimeException
21
+ * @return string
22
+ */
23
+ public function getURI ()
24
+ {
25
+ return "/_ingest/processor/grok " ;
26
+ }
27
+
28
+ /**
29
+ * @return string[]
30
+ */
31
+ public function getParamWhitelist ()
32
+ {
33
+ return [];
34
+ }
35
+
36
+ /**
37
+ * @return string
38
+ */
39
+ public function getMethod ()
40
+ {
41
+ return 'GET ' ;
42
+ }
43
+ }
Original file line number Diff line number Diff line change 4
4
5
5
use Elasticsearch \Endpoints \Ingest \Pipeline \Delete ;
6
6
use Elasticsearch \Endpoints \Ingest \Pipeline \Get ;
7
+ use Elasticsearch \Endpoints \Ingest \Pipeline \ProcessorGrok ;
7
8
use Elasticsearch \Endpoints \Ingest \Pipeline \Put ;
8
9
use Elasticsearch \Endpoints \Ingest \Simulate ;
9
10
@@ -111,4 +112,22 @@ public function simulate($params = array())
111
112
112
113
return $ this ->performRequest ($ endpoint );
113
114
}
115
+
116
+ /**
117
+ * $params[]
118
+ *
119
+ * @param $params array Associative array of parameters
120
+ *
121
+ * @return array
122
+ */
123
+ public function processorGrok ($ params = [])
124
+ {
125
+ /** @var callback $endpointBuilder */
126
+ $ endpointBuilder = $ this ->endpoints ;
127
+
128
+ /** @var ProcessorGrok $endpoint */
129
+ $ endpoint = $ endpointBuilder ('Ingest\ProcessorGrok ' );
130
+
131
+ return $ this ->performRequest ($ endpoint );
132
+ }
114
133
}
You can’t perform that action at this time.
0 commit comments