File tree Expand file tree Collapse file tree 6 files changed +5
-80
lines changed Expand file tree Collapse file tree 6 files changed +5
-80
lines changed Original file line number Diff line number Diff line change 1
1
# 6.0
2
2
3
3
- [ Search Templates] : PutTemplate endpoint has been removed (see [ Elasticsearch Breaking Changes] ( https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_60_scripting_changes.html#_stored_search_template_apis_removed ) ),
4
- use PutScript instead.
4
+ use PutScript instead.
5
+
6
+ - [ #674 ] ( https://github.com/elastic/elasticsearch-php/pull/674 ) ` ClientBuilder::defaultLogger() ` method was removed. It is recommended to [ create the logger object manually] ( https://github.com/elastic/elasticsearch-php/blob/master/docs/configuration.asciidoc#enabling-the-logger ) .
Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ The class defines the following methods:
46
46
* <<Elasticsearch_ClientputScript_putScript,`putScript()`>>
47
47
* <<Elasticsearch_ClientgetTemplate_getTemplate,`getTemplate()`>>
48
48
* <<Elasticsearch_ClientdeleteTemplate_deleteTemplate,`deleteTemplate()`>>
49
- * <<Elasticsearch_ClientputTemplate_putTemplate,`putTemplate()`>>
50
49
* <<Elasticsearch_ClientfieldStats_fieldStats,`fieldStats()`>>
51
50
* <<Elasticsearch_ClientfieldCaps_fieldCaps,`fieldCaps()`>>
52
51
* <<Elasticsearch_ClientrenderSearchTemplate_renderSearchTemplate,`renderSearchTemplate()`>>
@@ -1033,27 +1032,6 @@ $response = $client->deleteTemplate($params);
1033
1032
1034
1033
1035
1034
1036
- [[Elasticsearch_ClientputTemplate_putTemplate]]
1037
- .`putTemplate()`
1038
- ****
1039
- [source,php]
1040
- ----
1041
- /*
1042
- $params['id'] = (string) The search template ID (Required)
1043
- ['body'] = (array) Request body
1044
- */
1045
-
1046
- $params = [
1047
- // ...
1048
- ];
1049
-
1050
- $client = ClientBuilder::create()->build();
1051
- $response = $client->putTemplate($params);
1052
- ----
1053
- ****
1054
-
1055
-
1056
-
1057
1035
[[Elasticsearch_ClientfieldStats_fieldStats]]
1058
1036
.`fieldStats()`
1059
1037
****
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ The class defines the following methods:
20
20
* <<Elasticsearch_ClientBuilderdefaultHandler_defaultHandler,`defaultHandler()`>>
21
21
* <<Elasticsearch_ClientBuildermultiHandler_multiHandler,`multiHandler()`>>
22
22
* <<Elasticsearch_ClientBuildersingleHandler_singleHandler,`singleHandler()`>>
23
- * <<Elasticsearch_ClientBuilderdefaultLogger_defaultLogger,`defaultLogger()`>>
24
23
* <<Elasticsearch_ClientBuildersetConnectionFactory_setConnectionFactory,`setConnectionFactory()`>>
25
24
* <<Elasticsearch_ClientBuildersetConnectionPool_setConnectionPool,`setConnectionPool()`>>
26
25
* <<Elasticsearch_ClientBuildersetEndpoint_setEndpoint,`setEndpoint()`>>
@@ -157,19 +156,6 @@ corresponds to setConnectionPool().
157
156
158
157
159
158
160
- [[Elasticsearch_ClientBuilderdefaultLogger_defaultLogger]]
161
- .`defaultLogger()`
162
- ****
163
- [source,php]
164
- ----
165
- /*
166
- */
167
-
168
- ----
169
- ****
170
-
171
-
172
-
173
159
[[Elasticsearch_ClientBuildersetConnectionFactory_setConnectionFactory]]
174
160
.`setConnectionFactory()`
175
161
****
Original file line number Diff line number Diff line change 1
- C:19:"Sami\Renderer\Index":1041:{a:3:{i:0;a:10:{s:20:"Elasticsearch\Client";s:40:"6ac4061ad03df8cddeaec31a8bfb556fc7a33e71";s:27:"Elasticsearch\ClientBuilder";s:40:"30fa910e5653bf5f7096369ef1529a47da7e3e92";s:37:"Elasticsearch\Namespaces\CatNamespace";s:40:"a9d466909dc08564e9c1516162c3a6bb91dbecbe";s:41:"Elasticsearch\Namespaces\ClusterNamespace";s:40:"577bab662735319b93ed7b555cd2b12b73e40680";s:41:"Elasticsearch\Namespaces\IndicesNamespace";s:40:"66391991c19f28764c86e9604e231b9ce004c82e";s:40:"Elasticsearch\Namespaces\IngestNamespace";s:40:"9bd2962d80e3c0cdcaedda4f23b722b3a8cfa013";s:39:"Elasticsearch\Namespaces\NodesNamespace";s:40:"da4e71f9d953d00600920c26fe585b6884e45f94";s:40:"Elasticsearch\Namespaces\RemoteNamespace";s:40:"a503f6ea82452e1ea0275a044aeb527bc946616d";s:42:"Elasticsearch\Namespaces\SnapshotNamespace";s:40:"e28a1807789b0fcca3fd6b9712ed713650cf7ac2";s:39:"Elasticsearch\Namespaces\TasksNamespace";s:40:"2de86d7ab409a629320725f6444c76d2a9313c72";}i:1;a:1:{i:0;s:6:"master";}i:2;a:2:{i:0;s:13:"Elasticsearch";i:1;s:24:"Elasticsearch\Namespaces";}}}
1
+ C:19:"Sami\Renderer\Index":1041:{a:3:{i:0;a:10:{s:20:"Elasticsearch\Client";s:40:"1815e70d1a9613e61fbe3bf14e3c77e4321c3b31";s:27:"Elasticsearch\ClientBuilder";s:40:"824023c8ff5d33cd7085f75ff88b436b5dde0482";s:37:"Elasticsearch\Namespaces\CatNamespace";s:40:"a9d466909dc08564e9c1516162c3a6bb91dbecbe";s:41:"Elasticsearch\Namespaces\ClusterNamespace";s:40:"577bab662735319b93ed7b555cd2b12b73e40680";s:41:"Elasticsearch\Namespaces\IndicesNamespace";s:40:"66391991c19f28764c86e9604e231b9ce004c82e";s:40:"Elasticsearch\Namespaces\IngestNamespace";s:40:"9bd2962d80e3c0cdcaedda4f23b722b3a8cfa013";s:39:"Elasticsearch\Namespaces\NodesNamespace";s:40:"da4e71f9d953d00600920c26fe585b6884e45f94";s:40:"Elasticsearch\Namespaces\RemoteNamespace";s:40:"a503f6ea82452e1ea0275a044aeb527bc946616d";s:42:"Elasticsearch\Namespaces\SnapshotNamespace";s:40:"e28a1807789b0fcca3fd6b9712ed713650cf7ac2";s:39:"Elasticsearch\Namespaces\TasksNamespace";s:40:"2de86d7ab409a629320725f6444c76d2a9313c72";}i:1;a:1:{i:0;s:6:"master";}i:2;a:2:{i:0;s:13:"Elasticsearch";i:1;s:24:"Elasticsearch\Namespaces";}}}
Original file line number Diff line number Diff line change @@ -180,34 +180,7 @@ And then update your composer installation:
180
180
php composer.phar update
181
181
----------------------------
182
182
183
- Once Monolog (or another logger) is installed, you need to create a log object and inject it into the client. The
184
- `ClientBuilder` object has a helper static function that will generate a common Monolog-based logger for you. All you need
185
- to do is provide the path to your desired logging location:
186
-
187
- [source,php]
188
- ----
189
- $logger = ClientBuilder::defaultLogger('path/to/your.log');
190
-
191
- $client = ClientBuilder::create() // Instantiate a new ClientBuilder
192
- ->setLogger($logger) // Set the logger with a default logger
193
- ->build(); // Build the client object
194
- ----
195
-
196
- You can also specify the severity of log messages that you wish to log:
197
-
198
- [source,php]
199
- ----
200
- // set severity with second parameter
201
- $logger = ClientBuilder::defaultLogger('/path/to/logs/', Logger::INFO);
202
-
203
- $client = ClientBuilder::create() // Instantiate a new ClientBuilder
204
- ->setLogger($logger) // Set the logger with a default logger
205
- ->build(); // Build the client object
206
- ----
207
-
208
- The `defaultLogger()` method is just a helper, you are not required to use it. You can create your own logger and inject
209
- that instead:
210
-
183
+ Once Monolog (or another logger) is installed, you need to create a log object and inject it into the client:
211
184
212
185
[source,php]
213
186
----
Original file line number Diff line number Diff line change @@ -212,20 +212,6 @@ public static function singleHandler()
212
212
}
213
213
}
214
214
215
- /**
216
- * @param $path string
217
- * @param int $level
218
- * @return \Monolog\Logger\Logger
219
- */
220
- public static function defaultLogger ($ path , $ level = Logger::WARNING )
221
- {
222
- $ log = new Logger ('log ' );
223
- $ handler = new StreamHandler ($ path , $ level );
224
- $ log ->pushHandler ($ handler );
225
-
226
- return $ log ;
227
- }
228
-
229
215
/**
230
216
* @param \Elasticsearch\Connections\ConnectionFactoryInterface $connectionFactory
231
217
* @return $this
You can’t perform that action at this time.
0 commit comments