1 | <?php |
||
9 | class Type |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $name; |
||
15 | |||
16 | /** |
||
17 | * @var Index |
||
18 | */ |
||
19 | private $index; |
||
20 | |||
21 | /** |
||
22 | * @var array|null |
||
23 | */ |
||
24 | private $mappings; |
||
25 | |||
26 | /** |
||
27 | * @param string $name |
||
28 | * @param Index $index |
||
29 | * @param array $mappings |
||
30 | */ |
||
31 | public function __construct($name, Index $index, array $mappings = null) |
||
37 | |||
38 | /** |
||
39 | * @return string |
||
40 | */ |
||
41 | protected function getIndexName() |
||
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | protected function getIndexId() |
||
53 | |||
54 | /** |
||
55 | * Creates client request params appending options that define the index and type. |
||
56 | * |
||
57 | * @param array $params |
||
58 | * @return array |
||
59 | */ |
||
60 | protected function createRequestParams(array $params = []) |
||
67 | |||
68 | /** |
||
69 | * @return Client |
||
70 | */ |
||
71 | public function getClient() |
||
75 | |||
76 | /** |
||
77 | * Checks if the index exists in ES. |
||
78 | * |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function exists() |
||
87 | |||
88 | /** |
||
89 | * Creates the type mapping in ES. |
||
90 | */ |
||
91 | public function createMappings() |
||
103 | |||
104 | /** |
||
105 | * Deletes the type mappings in ES. |
||
106 | */ |
||
107 | public function deleteMappings() |
||
113 | |||
114 | /** |
||
115 | * Resets the type mappings in ES. |
||
116 | */ |
||
117 | public function reset() |
||
122 | |||
123 | /** |
||
124 | * @return array |
||
125 | */ |
||
126 | public function getMappings() |
||
130 | |||
131 | /** |
||
132 | * @return string |
||
133 | */ |
||
134 | public function getName() |
||
138 | |||
139 | /** |
||
140 | * @return Index |
||
141 | */ |
||
142 | public function getIndex() |
||
146 | |||
147 | /** |
||
148 | * @param Document $document |
||
149 | */ |
||
150 | public function putDocument(Document $document) |
||
154 | |||
155 | /** |
||
156 | * @param string|int $id |
||
157 | */ |
||
158 | public function deleteDocument($id) |
||
162 | |||
163 | /** |
||
164 | * @param array $documents |
||
165 | */ |
||
166 | public function putDocuments(array $documents) |
||
170 | |||
171 | /** |
||
172 | * @param array $ids |
||
173 | */ |
||
174 | public function deleteDocuments(array $ids) |
||
178 | |||
179 | /** |
||
180 | * @param array|string $query Array that will be serialized or raw JSON. |
||
181 | * @param array $options |
||
182 | * @return array |
||
183 | */ |
||
184 | public function search($query, array $options = []) |
||
188 | |||
189 | /** |
||
190 | * @param array|string $query Array that will be serialized or raw JSON. |
||
191 | * @param array $options |
||
192 | * @return int|null |
||
193 | */ |
||
194 | public function count($query, array $options = []) |
||
198 | |||
199 | /** |
||
200 | * @param array|string $query |
||
201 | * @param array $options |
||
202 | */ |
||
203 | public function deleteByQuery($query, array $options = []) |
||
207 | } |
||
208 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.