Skip to content

Commit

Permalink
Merge pull request #1234 from terascope/update-elasticsearch-api
Browse files Browse the repository at this point in the history
Update elasticsearch api from 4.0.0 to 4.0.1
  • Loading branch information
jsnoble authored Aug 27, 2024
2 parents 9037427 + 37a9599 commit 5625ea4
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion asset/asset.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "elasticsearch",
"version": "4.0.2"
"version": "4.0.3"
}
8 changes: 4 additions & 4 deletions asset/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "asset",
"displayName": "Asset",
"version": "4.0.2",
"version": "4.0.3",
"private": true,
"description": "",
"license": "MIT",
Expand All @@ -19,10 +19,10 @@
},
"dependencies": {
"@terascope/data-mate": "^1.0.3",
"@terascope/elasticsearch-api": "^4.0.0",
"@terascope/elasticsearch-asset-apis": "^1.0.1",
"@terascope/elasticsearch-api": "^4.0.1",
"@terascope/elasticsearch-asset-apis": "^1.0.2",
"@terascope/job-components": "^1.2.0",
"@terascope/teraslice-state-storage": "^1.0.0",
"@terascope/teraslice-state-storage": "^1.0.1",
"@terascope/utils": "^1.0.0",
"datemath-parser": "^1.0.6",
"got": "^13.0.0",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "elasticsearch-assets",
"displayName": "Elasticsearch Assets",
"version": "4.0.2",
"version": "4.0.3",
"private": true,
"description": "bundle of processors for teraslice",
"homepage": "https://github.com/terascope/elasticsearch-assets#readme",
Expand Down Expand Up @@ -46,12 +46,12 @@
"dependencies": {},
"devDependencies": {
"@terascope/data-types": "^1.0.0",
"@terascope/elasticsearch-api": "^4.0.0",
"@terascope/elasticsearch-asset-apis": "^1.0.1",
"@terascope/elasticsearch-api": "^4.0.1",
"@terascope/elasticsearch-asset-apis": "^1.0.2",
"@terascope/eslint-config": "^0.8.0",
"@terascope/job-components": "^1.2.0",
"@terascope/scripts": "1.0.0",
"@terascope/teraslice-state-storage": "^1.0.0",
"@terascope/teraslice-state-storage": "^1.0.1",
"@terascope/types": "^1.0.0",
"@types/bluebird": "^3.5.38",
"@types/got": "^9.6.12",
Expand Down
4 changes: 2 additions & 2 deletions packages/elasticsearch-asset-apis/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@terascope/elasticsearch-asset-apis",
"displayName": "Elasticsearch Asset Apis",
"version": "1.0.1",
"version": "1.0.2",
"description": "Elasticsearch reader and sender apis",
"homepage": "https://github.com/terascope/elasticsearch-assets",
"repository": "[email protected]:terascope/elasticsearch-assets.git",
Expand All @@ -28,7 +28,7 @@
"dependencies": {
"@terascope/data-mate": "^1.0.3",
"@terascope/data-types": "^1.0.0",
"@terascope/elasticsearch-api": "^4.0.0",
"@terascope/elasticsearch-api": "^4.0.1",
"@terascope/utils": "^1.0.0",
"datemath-parser": "^1.0.6",
"got": "^13.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
RouteSenderAPI, DataEntity, isString,
set, pMap
} from '@terascope/utils';
import elasticAPI, { BulkActionMetadata, BulkRecord } from '@terascope/elasticsearch-api';
import elasticAPI from '@terascope/elasticsearch-api';
import {
ElasticsearchSenderConfig, UpdateConfig
} from './interfaces.js';
Expand Down Expand Up @@ -56,7 +56,7 @@ export class ElasticsearchBulkSender implements RouteSenderAPI {
return '_doc';
}

* createBulkMetadata(input: Iterable<DataEntity>): Iterable<BulkRecord> {
* createBulkMetadata(input: Iterable<DataEntity>): Iterable<elasticAPI.BulkRecord> {
for (const record of input) {
yield this.createEsActionMeta(record);

Expand All @@ -72,7 +72,7 @@ export class ElasticsearchBulkSender implements RouteSenderAPI {
}
}

private createEsActionMeta(record: DataEntity): BulkRecord {
private createEsActionMeta(record: DataEntity): elasticAPI.BulkRecord {
const meta = this.buildMetadata(record);

if (this.config.update || this.config.upsert) {
Expand All @@ -90,8 +90,8 @@ export class ElasticsearchBulkSender implements RouteSenderAPI {
return { action: { index: meta }, data: record };
}

buildMetadata(record: DataEntity, metaKey = '_key'): Partial<BulkActionMetadata> {
const meta: Partial<BulkActionMetadata> = {
buildMetadata(record: DataEntity, metaKey = '_key'): Partial<elasticAPI.BulkActionMetadata> {
const meta: Partial<elasticAPI.BulkActionMetadata> = {
_index: this.createRoute(record),
_type: this.getType()
};
Expand All @@ -107,7 +107,7 @@ export class ElasticsearchBulkSender implements RouteSenderAPI {
return meta;
}

update(meta: Partial<BulkActionMetadata>, record: DataEntity): BulkRecord {
update(meta: Partial<elasticAPI.BulkActionMetadata>, record: DataEntity):elasticAPI.BulkRecord {
const data = this.addUpdateMethod(record);

if (this.config.upsert) {
Expand Down Expand Up @@ -158,9 +158,9 @@ export class ElasticsearchBulkSender implements RouteSenderAPI {
return data;
}

* chunkRequests(dataArray: Iterable<BulkRecord>): Iterable<BulkRecord[]> {
* chunkRequests(dataArray: Iterable<elasticAPI.BulkRecord>): Iterable<elasticAPI.BulkRecord[]> {
let i = 0;
let bulkChunk: BulkRecord[] = [];
let bulkChunk: elasticAPI.BulkRecord[] = [];

for (const item of dataArray) {
bulkChunk.push(item);
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -765,10 +765,10 @@
lodash "^4.17.21"
yargs "^17.7.2"

"@terascope/elasticsearch-api@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@terascope/elasticsearch-api/-/elasticsearch-api-4.0.0.tgz#f2d96e07641147fb1fd749f3a720f8428611680a"
integrity sha512-tsNLzCckv4s/lCAfYi5ezNXKafITiVHN1Ika3/CgsR8gI8C9i9AR3a0MC9hOdAaNM/MHkNoxZBrET56SUywKcw==
"@terascope/elasticsearch-api@^4.0.1":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@terascope/elasticsearch-api/-/elasticsearch-api-4.0.1.tgz#f127ef74267ce2111e90e3c6878c9fbb61681c3d"
integrity sha512-zkWjQ3XALhfXpaHS08fEp4DPbhGtlQAOYefDGfBvUyNZqJxXRKaY5HWqUuQqsQAK7EKJjGpO0kTkludt6Cw7Dw==
dependencies:
"@terascope/types" "^1.0.0"
"@terascope/utils" "^1.0.0"
Expand Down Expand Up @@ -845,12 +845,12 @@
typedoc-plugin-markdown "~4.0.3"
yargs "^17.7.2"

"@terascope/teraslice-state-storage@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@terascope/teraslice-state-storage/-/teraslice-state-storage-1.0.0.tgz#7b85b6b4e29945c765b55756a6bbac8684dd6e21"
integrity sha512-M/Oq+q7czSxsujaqAWBLDJ8Cc5pWieiD22PDyNzKvYu0t3IENnNqwRMBYUGrQvs7zQ6lhVVN6PerFH9DaAuZyw==
"@terascope/teraslice-state-storage@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@terascope/teraslice-state-storage/-/teraslice-state-storage-1.0.1.tgz#13de8bbd318ba11ec96cb494be18e639c3fda52c"
integrity sha512-9rNBfiVFa7gILi7TXHNHalV4sutsdAbPPBhCWIzPVoV3ZQSEJp7it/e0VjEmgtrV3uAeVhy0f90BWDhW+/gK7g==
dependencies:
"@terascope/elasticsearch-api" "^4.0.0"
"@terascope/elasticsearch-api" "^4.0.1"
"@terascope/utils" "^1.0.0"

"@terascope/types@^1.0.0":
Expand Down

0 comments on commit 5625ea4

Please sign in to comment.