1 shard, 0 replica.
Update default template:
curl -X PUT http://localhost:9200/_template/default -H 'Content-Type: application/json' -d '{"index_patterns": ["*"],"order": -1,"settings": {"number_of_shards": "1","number_of_replicas": "0"}}' 1 shard, 0 replica.
Update default template:
curl -X PUT http://localhost:9200/_template/default -H 'Content-Type: application/json' -d '{"index_patterns": ["*"],"order": -1,"settings": {"number_of_shards": "1","number_of_replicas": "0"}}' | package main | |
| import ( | |
| "strings" | |
| "path/filepath" | |
| ) | |
| func fileNameWithoutExtension(fileName string) string { | |
| return strings.TrimSuffix(fileName, filepath.Ext(fileName)) | |
| } |
| pm.sendRequest({ | |
| url: '{{your url}}', | |
| method: 'POST', | |
| header: { | |
| 'Content-Type': 'multipart/form-data', | |
| }, | |
| body: { | |
| mode: 'formdata', | |
| formdata: [ |
| const validate = require('jsonschema').validate; | |
| let schema = { | |
| "type": "object", | |
| "properties": { | |
| "x": { | |
| "display": "X Coordinate", // This is some extra field that we give for our purpose | |
| "type": "number", | |
| "required": true // error says like 'is required' | |
| }, |
| <?php | |
| /** | |
| * AES for PHP AES/ECB/PKCS5Padding | |
| * @author kevin(email: askyiwang@gmail.com, qq: 841694874) | |
| * @date 2016年10月25日22:27:21 | |
| * @charset utf-8 | |
| */ | |
| class Security { | |
| private $key = null; |
| import org.apache.http.client.HttpClient; | |
| import org.apache.http.client.config.CookieSpecs; | |
| import org.apache.http.client.config.RequestConfig; | |
| import org.apache.http.impl.client.CloseableHttpClient; | |
| import org.apache.http.impl.client.HttpClients; | |
| import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | |
| import org.springframework.boot.context.properties.EnableConfigurationProperties; | |
| import org.springframework.boot.web.client.RestTemplateCustomizer; |
| // Don't forget to import AVKit | |
| func encodeVideo(at videoURL: URL, completionHandler: ((URL?, Error?) -> Void)?) { | |
| let avAsset = AVURLAsset(url: videoURL, options: nil) | |
| let startDate = Date() | |
| //Create Export session | |
| guard let exportSession = AVAssetExportSession(asset: avAsset, presetName: AVAssetExportPresetPassthrough) else { | |
| completionHandler?(nil, nil) | |
| return |
| $ cat test.json | |
| json='{ "timestamp" : 1484825894873, "test" : "test"}' | |
| ab -c 10 -n 1000 -p test.json -T application/x-www-form-urlencoded https://example.com/test | |
| #https://prabuddha.me/apache-bench-ab-post-json-api/ |
| SELECT table, | |
| formatReadableSize(sum(bytes)) as size, | |
| min(min_date) as min_date, | |
| max(max_date) as max_date | |
| FROM system.parts | |
| WHERE active | |
| GROUP BY table |