@webiny/api-elasticsearch 0.0.0-mt-2 → 0.0.0-unstable.06b2ede40f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.d.ts +1 -0
- package/client.js +79 -36
- package/client.js.map +1 -0
- package/compression.d.ts +1 -1
- package/compression.js +13 -49
- package/compression.js.map +1 -0
- package/cursors.d.ts +3 -2
- package/cursors.js +10 -14
- package/cursors.js.map +1 -0
- package/index.d.ts +19 -4
- package/index.js +187 -13
- package/index.js.map +1 -0
- package/indexConfiguration/base.d.ts +6 -0
- package/indexConfiguration/base.js +42 -0
- package/indexConfiguration/base.js.map +1 -0
- package/indexConfiguration/common.d.ts +9 -0
- package/indexConfiguration/common.js +54 -0
- package/indexConfiguration/common.js.map +1 -0
- package/indexConfiguration/index.d.ts +3 -0
- package/indexConfiguration/index.js +40 -0
- package/indexConfiguration/index.js.map +1 -0
- package/indexConfiguration/japanese.d.ts +6 -0
- package/indexConfiguration/japanese.js +121 -0
- package/indexConfiguration/japanese.js.map +1 -0
- package/indexPrefix.d.ts +1 -0
- package/indexPrefix.js +12 -0
- package/indexPrefix.js.map +1 -0
- package/indices.d.ts +9 -0
- package/indices.js +30 -0
- package/indices.js.map +1 -0
- package/limit.js +2 -8
- package/limit.js.map +1 -0
- package/normalize.d.ts +1 -0
- package/normalize.js +47 -12
- package/normalize.js.map +1 -0
- package/operations/ElasticsearchCatHealth.d.ts +7 -0
- package/operations/ElasticsearchCatHealth.js +38 -0
- package/operations/ElasticsearchCatHealth.js.map +1 -0
- package/operations/ElasticsearchCatNodes.d.ts +7 -0
- package/operations/ElasticsearchCatNodes.js +36 -0
- package/operations/ElasticsearchCatNodes.js.map +1 -0
- package/operations/index.d.ts +3 -0
- package/operations/index.js +40 -0
- package/operations/index.js.map +1 -0
- package/operations/stripConnectionFromException.d.ts +1 -0
- package/operations/stripConnectionFromException.js +24 -0
- package/operations/stripConnectionFromException.js.map +1 -0
- package/operations/types.d.ts +35 -0
- package/operations/types.js +14 -0
- package/operations/types.js.map +1 -0
- package/operators.d.ts +5 -14
- package/operators.js +37 -32
- package/operators.js.map +1 -0
- package/package.json +12 -25
- package/plugins/definition/ElasticsearchBodyModifierPlugin.d.ts +1 -1
- package/plugins/definition/ElasticsearchBodyModifierPlugin.js +3 -12
- package/plugins/definition/ElasticsearchBodyModifierPlugin.js.map +1 -0
- package/plugins/definition/ElasticsearchFieldPlugin.d.ts +11 -17
- package/plugins/definition/ElasticsearchFieldPlugin.js +22 -75
- package/plugins/definition/ElasticsearchFieldPlugin.js.map +1 -0
- package/plugins/definition/ElasticsearchIndexPlugin.d.ts +18 -0
- package/plugins/definition/ElasticsearchIndexPlugin.js +36 -0
- package/plugins/definition/ElasticsearchIndexPlugin.js.map +1 -0
- package/plugins/definition/ElasticsearchQueryBuilderOperatorPlugin.d.ts +6 -2
- package/plugins/definition/ElasticsearchQueryBuilderOperatorPlugin.js +12 -8
- package/plugins/definition/ElasticsearchQueryBuilderOperatorPlugin.js.map +1 -0
- package/plugins/definition/ElasticsearchQueryModifierPlugin.d.ts +1 -1
- package/plugins/definition/ElasticsearchQueryModifierPlugin.js +3 -12
- package/plugins/definition/ElasticsearchQueryModifierPlugin.js.map +1 -0
- package/plugins/definition/ElasticsearchSortModifierPlugin.d.ts +1 -1
- package/plugins/definition/ElasticsearchSortModifierPlugin.js +3 -12
- package/plugins/definition/ElasticsearchSortModifierPlugin.js.map +1 -0
- package/plugins/definition/index.d.ts +6 -0
- package/plugins/definition/index.js +73 -0
- package/plugins/definition/index.js.map +1 -0
- package/plugins/index.d.ts +2 -0
- package/plugins/index.js +29 -0
- package/plugins/index.js.map +1 -0
- package/plugins/operator/andIn.d.ts +1 -1
- package/plugins/operator/andIn.js +6 -20
- package/plugins/operator/andIn.js.map +1 -0
- package/plugins/operator/between.d.ts +1 -1
- package/plugins/operator/between.js +10 -22
- package/plugins/operator/between.js.map +1 -0
- package/plugins/operator/contains.d.ts +1 -1
- package/plugins/operator/contains.js +4 -16
- package/plugins/operator/contains.js.map +1 -0
- package/plugins/operator/equal.d.ts +1 -1
- package/plugins/operator/equal.js +31 -19
- package/plugins/operator/equal.js.map +1 -0
- package/plugins/operator/gt.d.ts +1 -1
- package/plugins/operator/gt.js +4 -15
- package/plugins/operator/gt.js.map +1 -0
- package/plugins/operator/gte.d.ts +1 -1
- package/plugins/operator/gte.js +4 -15
- package/plugins/operator/gte.js.map +1 -0
- package/plugins/operator/in.d.ts +1 -1
- package/plugins/operator/in.js +9 -27
- package/plugins/operator/in.js.map +1 -0
- package/plugins/operator/index.d.ts +3 -0
- package/plugins/operator/index.js +36 -27
- package/plugins/operator/index.js.map +1 -0
- package/plugins/operator/japanese/contains.d.ts +8 -0
- package/plugins/operator/japanese/contains.js +44 -0
- package/plugins/operator/japanese/contains.js.map +1 -0
- package/plugins/operator/lt.d.ts +1 -1
- package/plugins/operator/lt.js +4 -15
- package/plugins/operator/lt.js.map +1 -0
- package/plugins/operator/lte.d.ts +1 -1
- package/plugins/operator/lte.js +4 -15
- package/plugins/operator/lte.js.map +1 -0
- package/plugins/operator/not.d.ts +1 -1
- package/plugins/operator/not.js +27 -16
- package/plugins/operator/not.js.map +1 -0
- package/plugins/operator/notBetween.d.ts +1 -1
- package/plugins/operator/notBetween.js +9 -21
- package/plugins/operator/notBetween.js.map +1 -0
- package/plugins/operator/notContains.d.ts +1 -1
- package/plugins/operator/notContains.js +4 -16
- package/plugins/operator/notContains.js.map +1 -0
- package/plugins/operator/notIn.d.ts +1 -1
- package/plugins/operator/notIn.js +6 -18
- package/plugins/operator/notIn.js.map +1 -0
- package/plugins/operator/notStartsWith.d.ts +7 -0
- package/plugins/operator/notStartsWith.js +30 -0
- package/plugins/operator/notStartsWith.js.map +1 -0
- package/plugins/operator/startsWith.d.ts +7 -0
- package/plugins/operator/startsWith.js +30 -0
- package/plugins/operator/startsWith.js.map +1 -0
- package/sharedIndex.d.ts +1 -0
- package/sharedIndex.js +12 -0
- package/sharedIndex.js.map +1 -0
- package/sort.d.ts +5 -4
- package/sort.js +22 -17
- package/sort.js.map +1 -0
- package/types.d.ts +178 -6
- package/types.js +14 -3
- package/types.js.map +1 -0
- package/utils/createIndex.d.ts +20 -0
- package/utils/createIndex.js +100 -0
- package/utils/createIndex.js.map +1 -0
- package/utils/index.d.ts +3 -0
- package/utils/index.js +29 -0
- package/utils/index.js.map +1 -0
- package/utils/waitUntilHealthy/UnhealthyClusterError.d.ts +4 -0
- package/utils/waitUntilHealthy/UnhealthyClusterError.js +18 -0
- package/utils/waitUntilHealthy/UnhealthyClusterError.js.map +1 -0
- package/utils/waitUntilHealthy/WaitUntilHealthy.d.ts +71 -0
- package/utils/waitUntilHealthy/WaitUntilHealthy.js +157 -0
- package/utils/waitUntilHealthy/WaitUntilHealthy.js.map +1 -0
- package/utils/waitUntilHealthy/WaitingHealthyClusterAbortedError.d.ts +4 -0
- package/utils/waitUntilHealthy/WaitingHealthyClusterAbortedError.js +18 -0
- package/utils/waitUntilHealthy/WaitingHealthyClusterAbortedError.js.map +1 -0
- package/utils/waitUntilHealthy/index.d.ts +6 -0
- package/utils/waitUntilHealthy/index.js +51 -0
- package/utils/waitUntilHealthy/index.js.map +1 -0
- package/utils/waitUntilHealthy/reason/ClusterHealthReason.d.ts +15 -0
- package/utils/waitUntilHealthy/reason/ClusterHealthReason.js +21 -0
- package/utils/waitUntilHealthy/reason/ClusterHealthReason.js.map +1 -0
- package/utils/waitUntilHealthy/reason/IReason.d.ts +4 -0
- package/utils/waitUntilHealthy/reason/IReason.js +7 -0
- package/utils/waitUntilHealthy/reason/IReason.js.map +1 -0
- package/utils/waitUntilHealthy/reason/MemoryReason.d.ts +14 -0
- package/utils/waitUntilHealthy/reason/MemoryReason.js +21 -0
- package/utils/waitUntilHealthy/reason/MemoryReason.js.map +1 -0
- package/utils/waitUntilHealthy/reason/ProcessorReason.d.ts +14 -0
- package/utils/waitUntilHealthy/reason/ProcessorReason.js +21 -0
- package/utils/waitUntilHealthy/reason/ProcessorReason.js.map +1 -0
- package/utils/waitUntilHealthy/reason/index.d.ts +3 -0
- package/utils/waitUntilHealthy/reason/index.js +40 -0
- package/utils/waitUntilHealthy/reason/index.js.map +1 -0
- package/where.d.ts +5 -5
- package/where.js +11 -26
- package/where.js.map +1 -0
- package/plugins/GzipCompression.d.ts +0 -19
- package/plugins/GzipCompression.js +0 -75
- package/plugins/definition/CompressionPlugin.d.ts +0 -20
- package/plugins/definition/CompressionPlugin.js +0 -17
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ElasticsearchIndexRequestBodyMappingsDynamicTemplate } from "../types";
|
|
2
|
+
interface Modifier {
|
|
3
|
+
(mappings: ElasticsearchIndexRequestBodyMappingsDynamicTemplate[]): ElasticsearchIndexRequestBodyMappingsDynamicTemplate[];
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const getCommonMappings: (cb?: Modifier) => ElasticsearchIndexRequestBodyMappingsDynamicTemplate[];
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getCommonMappings = void 0;
|
|
7
|
+
const getDefaultMappings = () => {
|
|
8
|
+
return [{
|
|
9
|
+
ids: {
|
|
10
|
+
match: "^id|entryId$",
|
|
11
|
+
mapping: {
|
|
12
|
+
type: "string",
|
|
13
|
+
keyword: true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}, {
|
|
17
|
+
/**
|
|
18
|
+
* Update with the correct date fields.
|
|
19
|
+
*/
|
|
20
|
+
dates: {
|
|
21
|
+
match: "^createdOn|savedOn|publishedOn$",
|
|
22
|
+
mapping: {
|
|
23
|
+
type: "date"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, {
|
|
27
|
+
numbers: {
|
|
28
|
+
match: "number@*",
|
|
29
|
+
mapping: {
|
|
30
|
+
type: "scaled_float",
|
|
31
|
+
scaling_factor: 10000
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}, {
|
|
35
|
+
booleans: {
|
|
36
|
+
match: "boolean@*",
|
|
37
|
+
mapping: {
|
|
38
|
+
type: "boolean"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}];
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
const getCommonMappings = cb => {
|
|
47
|
+
if (!cb) {
|
|
48
|
+
return getDefaultMappings();
|
|
49
|
+
}
|
|
50
|
+
return cb(getDefaultMappings());
|
|
51
|
+
};
|
|
52
|
+
exports.getCommonMappings = getCommonMappings;
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getDefaultMappings","ids","match","mapping","type","keyword","dates","numbers","scaling_factor","booleans","getCommonMappings","cb","exports"],"sources":["common.ts"],"sourcesContent":["import type { ElasticsearchIndexRequestBodyMappingsDynamicTemplate } from \"~/types\";\n\nconst getDefaultMappings = (): ElasticsearchIndexRequestBodyMappingsDynamicTemplate[] => {\n return [\n {\n ids: {\n match: \"^id|entryId$\",\n mapping: {\n type: \"string\",\n keyword: true\n }\n }\n },\n {\n /**\n * Update with the correct date fields.\n */\n dates: {\n match: \"^createdOn|savedOn|publishedOn$\",\n mapping: {\n type: \"date\"\n }\n }\n },\n {\n numbers: {\n match: \"number@*\",\n mapping: {\n type: \"scaled_float\",\n scaling_factor: 10000\n }\n }\n },\n {\n booleans: {\n match: \"boolean@*\",\n mapping: {\n type: \"boolean\"\n }\n }\n }\n ];\n};\n\ninterface Modifier {\n (\n mappings: ElasticsearchIndexRequestBodyMappingsDynamicTemplate[]\n ): ElasticsearchIndexRequestBodyMappingsDynamicTemplate[];\n}\n/**\n * @internal\n */\nexport const getCommonMappings = (\n cb?: Modifier\n): ElasticsearchIndexRequestBodyMappingsDynamicTemplate[] => {\n if (!cb) {\n return getDefaultMappings();\n }\n\n return cb(getDefaultMappings());\n};\n"],"mappings":";;;;;;AAEA,MAAMA,kBAAkB,GAAGA,CAAA,KAA8D;EACrF,OAAO,CACH;IACIC,GAAG,EAAE;MACDC,KAAK,EAAE,cAAc;MACrBC,OAAO,EAAE;QACLC,IAAI,EAAE,QAAQ;QACdC,OAAO,EAAE;MACb;IACJ;EACJ,CAAC,EACD;IACI;AACZ;AACA;IACYC,KAAK,EAAE;MACHJ,KAAK,EAAE,iCAAiC;MACxCC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV;IACJ;EACJ,CAAC,EACD;IACIG,OAAO,EAAE;MACLL,KAAK,EAAE,UAAU;MACjBC,OAAO,EAAE;QACLC,IAAI,EAAE,cAAc;QACpBI,cAAc,EAAE;MACpB;IACJ;EACJ,CAAC,EACD;IACIC,QAAQ,EAAE;MACNP,KAAK,EAAE,WAAW;MAClBC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV;IACJ;EACJ,CAAC,CACJ;AACL,CAAC;AAOD;AACA;AACA;AACO,MAAMM,iBAAiB,GAC1BC,EAAa,IAC4C;EACzD,IAAI,CAACA,EAAE,EAAE;IACL,OAAOX,kBAAkB,CAAC,CAAC;EAC/B;EAEA,OAAOW,EAAE,CAACX,kBAAkB,CAAC,CAAC,CAAC;AACnC,CAAC;AAACY,OAAA,CAAAF,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _base = require("./base");
|
|
7
|
+
Object.keys(_base).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _base[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _base[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _common = require("./common");
|
|
18
|
+
Object.keys(_common).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _common[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _common[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _japanese = require("./japanese");
|
|
29
|
+
Object.keys(_japanese).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _japanese[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _japanese[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_base","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_common","_japanese"],"sources":["index.ts"],"sourcesContent":["export * from \"./base\";\nexport * from \"./common\";\nexport * from \"./japanese\";\n"],"mappings":";;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,KAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,OAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,OAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,OAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,OAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,SAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,SAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,SAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,SAAA,CAAAN,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ElasticsearchIndexRequestBody } from "../types";
|
|
2
|
+
interface Modifier {
|
|
3
|
+
(config: ElasticsearchIndexRequestBody): ElasticsearchIndexRequestBody;
|
|
4
|
+
}
|
|
5
|
+
export declare const getJapaneseConfiguration: (modifier?: Modifier) => ElasticsearchIndexRequestBody;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getJapaneseConfiguration = void 0;
|
|
7
|
+
var _common = require("./common");
|
|
8
|
+
const config = {
|
|
9
|
+
settings: {
|
|
10
|
+
index: {
|
|
11
|
+
analysis: {
|
|
12
|
+
char_filter: {
|
|
13
|
+
normalize: {
|
|
14
|
+
type: "icu_normalizer",
|
|
15
|
+
name: "nfkc",
|
|
16
|
+
mode: "compose"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
tokenizer: {
|
|
20
|
+
ja_kuromoji_tokenizer: {
|
|
21
|
+
mode: "search",
|
|
22
|
+
type: "kuromoji_tokenizer",
|
|
23
|
+
discard_compound_token: "true",
|
|
24
|
+
user_dictionary_rules: ["東京スカイツリー,東京 スカイツリー,トウキョウ スカイツリー,カスタム名詞"]
|
|
25
|
+
},
|
|
26
|
+
ja_ngram_tokenizer: {
|
|
27
|
+
type: "ngram",
|
|
28
|
+
min_gram: "2",
|
|
29
|
+
max_gram: "2",
|
|
30
|
+
token_chars: ["letter", "digit"]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
filter: {
|
|
34
|
+
ja_index_synonym: {
|
|
35
|
+
type: "synonym",
|
|
36
|
+
lenient: "false",
|
|
37
|
+
synonyms: []
|
|
38
|
+
},
|
|
39
|
+
ja_search_synonym: {
|
|
40
|
+
type: "synonym_graph",
|
|
41
|
+
lenient: "false",
|
|
42
|
+
synonyms: ["米国, アメリカ", "東京大学, 東大"]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
analyzer: {
|
|
46
|
+
ja_kuromoji_index_analyzer: {
|
|
47
|
+
type: "custom",
|
|
48
|
+
char_filter: ["normalize"],
|
|
49
|
+
tokenizer: "ja_kuromoji_tokenizer",
|
|
50
|
+
filter: ["kuromoji_baseform", "kuromoji_part_of_speech", "ja_index_synonym", "cjk_width", "ja_stop", "kuromoji_stemmer", "lowercase"]
|
|
51
|
+
},
|
|
52
|
+
ja_kuromoji_search_analyzer: {
|
|
53
|
+
type: "custom",
|
|
54
|
+
char_filter: ["normalize"],
|
|
55
|
+
tokenizer: "ja_kuromoji_tokenizer",
|
|
56
|
+
filter: ["kuromoji_baseform", "kuromoji_part_of_speech", "ja_search_synonym", "cjk_width", "ja_stop", "kuromoji_stemmer", "lowercase"]
|
|
57
|
+
},
|
|
58
|
+
ja_ngram_index_analyzer: {
|
|
59
|
+
type: "custom",
|
|
60
|
+
char_filter: ["normalize"],
|
|
61
|
+
tokenizer: "ja_ngram_tokenizer",
|
|
62
|
+
filter: ["lowercase"]
|
|
63
|
+
},
|
|
64
|
+
ja_ngram_search_analyzer: {
|
|
65
|
+
type: "custom",
|
|
66
|
+
char_filter: ["normalize"],
|
|
67
|
+
tokenizer: "ja_ngram_tokenizer",
|
|
68
|
+
filter: ["ja_search_synonym", "lowercase"]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
default: {
|
|
72
|
+
type: "ja_kuromoji_index_analyzer"
|
|
73
|
+
},
|
|
74
|
+
default_search: {
|
|
75
|
+
type: "ja_kuromoji_search_analyzer"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
mappings: {
|
|
81
|
+
numeric_detection: true,
|
|
82
|
+
dynamic_templates: (0, _common.getCommonMappings)(mappings => {
|
|
83
|
+
return mappings.concat([{
|
|
84
|
+
strings: {
|
|
85
|
+
match_mapping_type: "string",
|
|
86
|
+
mapping: {
|
|
87
|
+
type: "text",
|
|
88
|
+
search_analyzer: "ja_kuromoji_search_analyzer",
|
|
89
|
+
analyzer: "ja_kuromoji_index_analyzer",
|
|
90
|
+
fields: {
|
|
91
|
+
ngram: {
|
|
92
|
+
type: "text",
|
|
93
|
+
search_analyzer: "ja_ngram_search_analyzer",
|
|
94
|
+
analyzer: "ja_ngram_index_analyzer"
|
|
95
|
+
},
|
|
96
|
+
keyword: {
|
|
97
|
+
ignore_above: 256,
|
|
98
|
+
type: "keyword"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}]);
|
|
104
|
+
}),
|
|
105
|
+
properties: {
|
|
106
|
+
rawValues: {
|
|
107
|
+
type: "object",
|
|
108
|
+
enabled: false
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const getJapaneseConfiguration = modifier => {
|
|
114
|
+
if (!modifier) {
|
|
115
|
+
return config;
|
|
116
|
+
}
|
|
117
|
+
return modifier(config);
|
|
118
|
+
};
|
|
119
|
+
exports.getJapaneseConfiguration = getJapaneseConfiguration;
|
|
120
|
+
|
|
121
|
+
//# sourceMappingURL=japanese.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_common","require","config","settings","index","analysis","char_filter","normalize","type","name","mode","tokenizer","ja_kuromoji_tokenizer","discard_compound_token","user_dictionary_rules","ja_ngram_tokenizer","min_gram","max_gram","token_chars","filter","ja_index_synonym","lenient","synonyms","ja_search_synonym","analyzer","ja_kuromoji_index_analyzer","ja_kuromoji_search_analyzer","ja_ngram_index_analyzer","ja_ngram_search_analyzer","default","default_search","mappings","numeric_detection","dynamic_templates","getCommonMappings","concat","strings","match_mapping_type","mapping","search_analyzer","fields","ngram","keyword","ignore_above","properties","rawValues","enabled","getJapaneseConfiguration","modifier","exports"],"sources":["japanese.ts"],"sourcesContent":["import type { ElasticsearchIndexRequestBody } from \"~/types\";\nimport { getCommonMappings } from \"./common\";\n\nconst config: ElasticsearchIndexRequestBody = {\n settings: {\n index: {\n analysis: {\n char_filter: {\n normalize: {\n type: \"icu_normalizer\",\n name: \"nfkc\",\n mode: \"compose\"\n }\n },\n tokenizer: {\n ja_kuromoji_tokenizer: {\n mode: \"search\",\n type: \"kuromoji_tokenizer\",\n discard_compound_token: \"true\",\n user_dictionary_rules: [\n \"東京スカイツリー,東京 スカイツリー,トウキョウ スカイツリー,カスタム名詞\"\n ]\n },\n ja_ngram_tokenizer: {\n type: \"ngram\",\n min_gram: \"2\",\n max_gram: \"2\",\n token_chars: [\"letter\", \"digit\"]\n }\n },\n filter: {\n ja_index_synonym: {\n type: \"synonym\",\n lenient: \"false\",\n synonyms: []\n },\n ja_search_synonym: {\n type: \"synonym_graph\",\n lenient: \"false\",\n synonyms: [\"米国, アメリカ\", \"東京大学, 東大\"]\n }\n },\n analyzer: {\n ja_kuromoji_index_analyzer: {\n type: \"custom\",\n char_filter: [\"normalize\"],\n tokenizer: \"ja_kuromoji_tokenizer\",\n filter: [\n \"kuromoji_baseform\",\n \"kuromoji_part_of_speech\",\n \"ja_index_synonym\",\n \"cjk_width\",\n \"ja_stop\",\n \"kuromoji_stemmer\",\n \"lowercase\"\n ]\n },\n ja_kuromoji_search_analyzer: {\n type: \"custom\",\n char_filter: [\"normalize\"],\n tokenizer: \"ja_kuromoji_tokenizer\",\n filter: [\n \"kuromoji_baseform\",\n \"kuromoji_part_of_speech\",\n \"ja_search_synonym\",\n \"cjk_width\",\n \"ja_stop\",\n \"kuromoji_stemmer\",\n \"lowercase\"\n ]\n },\n ja_ngram_index_analyzer: {\n type: \"custom\",\n char_filter: [\"normalize\"],\n tokenizer: \"ja_ngram_tokenizer\",\n filter: [\"lowercase\"]\n },\n ja_ngram_search_analyzer: {\n type: \"custom\",\n char_filter: [\"normalize\"],\n tokenizer: \"ja_ngram_tokenizer\",\n filter: [\"ja_search_synonym\", \"lowercase\"]\n }\n },\n default: {\n type: \"ja_kuromoji_index_analyzer\"\n },\n default_search: {\n type: \"ja_kuromoji_search_analyzer\"\n }\n }\n }\n },\n mappings: {\n numeric_detection: true,\n dynamic_templates: getCommonMappings(mappings => {\n return mappings.concat([\n {\n strings: {\n match_mapping_type: \"string\",\n mapping: {\n type: \"text\",\n search_analyzer: \"ja_kuromoji_search_analyzer\",\n analyzer: \"ja_kuromoji_index_analyzer\",\n fields: {\n ngram: {\n type: \"text\",\n search_analyzer: \"ja_ngram_search_analyzer\",\n analyzer: \"ja_ngram_index_analyzer\"\n },\n keyword: {\n ignore_above: 256,\n type: \"keyword\"\n }\n }\n }\n }\n }\n ]);\n }),\n properties: {\n rawValues: {\n type: \"object\",\n enabled: false\n }\n }\n }\n};\n\ninterface Modifier {\n (config: ElasticsearchIndexRequestBody): ElasticsearchIndexRequestBody;\n}\nexport const getJapaneseConfiguration = (modifier?: Modifier) => {\n if (!modifier) {\n return config;\n }\n return modifier(config);\n};\n"],"mappings":"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","ignoreList":[]}
|
package/indexPrefix.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getElasticsearchIndexPrefix: () => string;
|
package/indexPrefix.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getElasticsearchIndexPrefix = void 0;
|
|
7
|
+
const getElasticsearchIndexPrefix = () => {
|
|
8
|
+
return process.env.ELASTIC_SEARCH_INDEX_PREFIX || process.env.WEBINY_ELASTIC_SEARCH_INDEX_PREFIX || "";
|
|
9
|
+
};
|
|
10
|
+
exports.getElasticsearchIndexPrefix = getElasticsearchIndexPrefix;
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=indexPrefix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getElasticsearchIndexPrefix","process","env","ELASTIC_SEARCH_INDEX_PREFIX","WEBINY_ELASTIC_SEARCH_INDEX_PREFIX","exports"],"sources":["indexPrefix.ts"],"sourcesContent":["export const getElasticsearchIndexPrefix = (): string => {\n return (\n process.env.ELASTIC_SEARCH_INDEX_PREFIX ||\n process.env.WEBINY_ELASTIC_SEARCH_INDEX_PREFIX ||\n \"\"\n );\n};\n"],"mappings":";;;;;;AAAO,MAAMA,2BAA2B,GAAGA,CAAA,KAAc;EACrD,OACIC,OAAO,CAACC,GAAG,CAACC,2BAA2B,IACvCF,OAAO,CAACC,GAAG,CAACE,kCAAkC,IAC9C,EAAE;AAEV,CAAC;AAACC,OAAA,CAAAL,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
package/indices.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ElasticsearchIndexPlugin } from "./plugins/definition/ElasticsearchIndexPlugin";
|
|
2
|
+
import type { PluginsContainer } from "@webiny/plugins";
|
|
3
|
+
interface IndicesPluginsParams {
|
|
4
|
+
container: PluginsContainer;
|
|
5
|
+
type: string;
|
|
6
|
+
locale: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const getLastAddedIndexPlugin: <T extends ElasticsearchIndexPlugin>(params: IndicesPluginsParams) => T;
|
|
9
|
+
export {};
|
package/indices.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getLastAddedIndexPlugin = void 0;
|
|
8
|
+
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
9
|
+
const listIndicesPlugins = ({
|
|
10
|
+
container,
|
|
11
|
+
type,
|
|
12
|
+
locale
|
|
13
|
+
}) => {
|
|
14
|
+
return container.byType(type).filter(plugin => {
|
|
15
|
+
return plugin.canUse(locale);
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const getLastAddedIndexPlugin = params => {
|
|
19
|
+
const plugins = listIndicesPlugins(params);
|
|
20
|
+
if (plugins.length === 0) {
|
|
21
|
+
throw new _error.default(`Could not find a single ElasticsearchIndexPlugin of type "${params.type}".`, "ELASTICSEARCH_INDEX_TEMPLATE_ERROR", {
|
|
22
|
+
type: params.type,
|
|
23
|
+
locale: params.locale
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return plugins.pop();
|
|
27
|
+
};
|
|
28
|
+
exports.getLastAddedIndexPlugin = getLastAddedIndexPlugin;
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=indices.js.map
|
package/indices.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_error","_interopRequireDefault","require","listIndicesPlugins","container","type","locale","byType","filter","plugin","canUse","getLastAddedIndexPlugin","params","plugins","length","WebinyError","pop","exports"],"sources":["indices.ts"],"sourcesContent":["import type { ElasticsearchIndexPlugin } from \"~/plugins/definition/ElasticsearchIndexPlugin\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport WebinyError from \"@webiny/error\";\n\ninterface IndicesPluginsParams {\n container: PluginsContainer;\n type: string;\n locale: string;\n}\nconst listIndicesPlugins = <T extends ElasticsearchIndexPlugin>({\n container,\n type,\n locale\n}: IndicesPluginsParams): T[] => {\n return container.byType<T>(type).filter(plugin => {\n return plugin.canUse(locale);\n });\n};\n\nexport const getLastAddedIndexPlugin = <T extends ElasticsearchIndexPlugin>(\n params: IndicesPluginsParams\n): T => {\n const plugins = listIndicesPlugins<T>(params);\n if (plugins.length === 0) {\n throw new WebinyError(\n `Could not find a single ElasticsearchIndexPlugin of type \"${params.type}\".`,\n \"ELASTICSEARCH_INDEX_TEMPLATE_ERROR\",\n {\n type: params.type,\n locale: params.locale\n }\n );\n }\n\n return plugins.pop() as T;\n};\n"],"mappings":";;;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAOA,MAAMC,kBAAkB,GAAGA,CAAqC;EAC5DC,SAAS;EACTC,IAAI;EACJC;AACkB,CAAC,KAAU;EAC7B,OAAOF,SAAS,CAACG,MAAM,CAAIF,IAAI,CAAC,CAACG,MAAM,CAACC,MAAM,IAAI;IAC9C,OAAOA,MAAM,CAACC,MAAM,CAACJ,MAAM,CAAC;EAChC,CAAC,CAAC;AACN,CAAC;AAEM,MAAMK,uBAAuB,GAChCC,MAA4B,IACxB;EACJ,MAAMC,OAAO,GAAGV,kBAAkB,CAAIS,MAAM,CAAC;EAC7C,IAAIC,OAAO,CAACC,MAAM,KAAK,CAAC,EAAE;IACtB,MAAM,IAAIC,cAAW,CACjB,6DAA6DH,MAAM,CAACP,IAAI,IAAI,EAC5E,oCAAoC,EACpC;MACIA,IAAI,EAAEO,MAAM,CAACP,IAAI;MACjBC,MAAM,EAAEM,MAAM,CAACN;IACnB,CACJ,CAAC;EACL;EAEA,OAAOO,OAAO,CAACG,GAAG,CAAC,CAAC;AACxB,CAAC;AAACC,OAAA,CAAAN,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
package/limit.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.createLimit = void 0;
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* This is the max limit of the Elasticsearch.
|
|
10
9
|
* Change here if it changes (and if it is necessary).
|
|
@@ -13,9 +12,7 @@ const ES_LIMIT_MAX = 10000;
|
|
|
13
12
|
/**
|
|
14
13
|
* Our system default limit.
|
|
15
14
|
*/
|
|
16
|
-
|
|
17
15
|
const ES_LIMIT_DEFAULT = 50;
|
|
18
|
-
|
|
19
16
|
const createLimit = (limit, defaultValue = ES_LIMIT_DEFAULT) => {
|
|
20
17
|
/**
|
|
21
18
|
* Limit can possibly be null/undefined or less than 1.
|
|
@@ -28,8 +25,6 @@ const createLimit = (limit, defaultValue = ES_LIMIT_DEFAULT) => {
|
|
|
28
25
|
* Users input limit cannot be greater than the Elasticsearch one.
|
|
29
26
|
* Elasticsearch query breaks because of that.
|
|
30
27
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
28
|
if (limit < ES_LIMIT_MAX) {
|
|
34
29
|
return limit;
|
|
35
30
|
}
|
|
@@ -37,9 +32,8 @@ const createLimit = (limit, defaultValue = ES_LIMIT_DEFAULT) => {
|
|
|
37
32
|
* Always reduce by 1 because we check if there are more items by adding 1 to the limit
|
|
38
33
|
* and then remove that last one loaded.
|
|
39
34
|
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
35
|
return ES_LIMIT_MAX - 1;
|
|
43
36
|
};
|
|
37
|
+
exports.createLimit = createLimit;
|
|
44
38
|
|
|
45
|
-
|
|
39
|
+
//# sourceMappingURL=limit.js.map
|
package/limit.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ES_LIMIT_MAX","ES_LIMIT_DEFAULT","createLimit","limit","defaultValue","exports"],"sources":["limit.ts"],"sourcesContent":["/**\n * This is the max limit of the Elasticsearch.\n * Change here if it changes (and if it is necessary).\n */\nconst ES_LIMIT_MAX = 10000;\n/**\n * Our system default limit.\n */\nconst ES_LIMIT_DEFAULT = 50;\n\nexport const createLimit = (limit?: number, defaultValue = ES_LIMIT_DEFAULT): number => {\n /**\n * Limit can possibly be null/undefined or less than 1.\n * In that case return the defaults.\n */\n if (!limit || limit < 1) {\n return defaultValue;\n }\n /**\n * Users input limit cannot be greater than the Elasticsearch one.\n * Elasticsearch query breaks because of that.\n */\n if (limit < ES_LIMIT_MAX) {\n return limit;\n }\n /**\n * Always reduce by 1 because we check if there are more items by adding 1 to the limit\n * and then remove that last one loaded.\n */\n return ES_LIMIT_MAX - 1;\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA,MAAMA,YAAY,GAAG,KAAK;AAC1B;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,EAAE;AAEpB,MAAMC,WAAW,GAAGA,CAACC,KAAc,EAAEC,YAAY,GAAGH,gBAAgB,KAAa;EACpF;AACJ;AACA;AACA;EACI,IAAI,CAACE,KAAK,IAAIA,KAAK,GAAG,CAAC,EAAE;IACrB,OAAOC,YAAY;EACvB;EACA;AACJ;AACA;AACA;EACI,IAAID,KAAK,GAAGH,YAAY,EAAE;IACtB,OAAOG,KAAK;EAChB;EACA;AACJ;AACA;AACA;EACI,OAAOH,YAAY,GAAG,CAAC;AAC3B,CAAC;AAACK,OAAA,CAAAH,WAAA,GAAAA,WAAA","ignoreList":[]}
|
package/normalize.d.ts
CHANGED
|
@@ -3,3 +3,4 @@
|
|
|
3
3
|
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters
|
|
4
4
|
*/
|
|
5
5
|
export declare const normalizeValue: (value: string) => string;
|
|
6
|
+
export declare const normalizeValueWithAsterisk: (initial: string) => string;
|
package/normalize.js
CHANGED
|
@@ -3,25 +3,60 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.normalizeValue = void 0;
|
|
7
|
-
|
|
6
|
+
exports.normalizeValueWithAsterisk = exports.normalizeValue = void 0;
|
|
8
7
|
/**
|
|
9
8
|
* Before performing the query, we need to escape all special characters.
|
|
10
9
|
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters
|
|
11
10
|
*/
|
|
12
|
-
const RESERVED_CHARACTERS = {
|
|
13
|
-
// These characters need to be escaped with backslash ("\").
|
|
14
|
-
escape: ["\\\\", "\\/", "\\+", "\\-", "\\=", "\\&\\&", "\\|\\|", "\\!", "\\(", "\\)", "\\{", "\\}", "\\[", "\\]", "\\^", '\\"', "\\~", "\\*", "\\?", "\\:", "\\>", "\\<"]
|
|
15
|
-
};
|
|
16
11
|
|
|
12
|
+
const specialCharactersToRemove = [`\\?`];
|
|
13
|
+
const specialCharacterToSpace = ["-"];
|
|
14
|
+
const specialCharacters = ["\\\\", "\\+",
|
|
15
|
+
// "\\-",
|
|
16
|
+
"\\=", `\&`, `\\|`, ">", "<", `\!`, "\\(", "\\)", "\\{", "\\}", "\\[", "\\]", "\\^", '\\"', "\\~", "\\*", `\:`, `\/`, "\\#"];
|
|
17
17
|
const normalizeValue = value => {
|
|
18
|
+
let result = value || "";
|
|
19
|
+
if (!result) {
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
for (const character of specialCharactersToRemove) {
|
|
23
|
+
result = result.replace(new RegExp(character, "g"), "");
|
|
24
|
+
}
|
|
25
|
+
for (const character of specialCharacterToSpace) {
|
|
26
|
+
result = result.replace(new RegExp(character, "g"), " ");
|
|
27
|
+
}
|
|
28
|
+
for (const character of specialCharacters) {
|
|
29
|
+
result = result.replace(new RegExp(character, "g"), `\\${character}`);
|
|
30
|
+
}
|
|
31
|
+
return result || "";
|
|
32
|
+
};
|
|
33
|
+
exports.normalizeValue = normalizeValue;
|
|
34
|
+
const hasSpecialChar = value => {
|
|
35
|
+
if (!value) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
return value.match(/^([0-9a-zA-Z]+)$/i) === null;
|
|
39
|
+
};
|
|
40
|
+
const normalizeValueWithAsterisk = initial => {
|
|
41
|
+
const value = normalizeValue(initial);
|
|
42
|
+
const results = value.split(" ");
|
|
18
43
|
let result = value;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
44
|
+
/**
|
|
45
|
+
* If there is a / in the first word, do not put asterisk in front of it.
|
|
46
|
+
*/
|
|
47
|
+
const firstWord = results[0];
|
|
48
|
+
if (hasSpecialChar(firstWord) === false) {
|
|
49
|
+
result = `*${result}`;
|
|
22
50
|
}
|
|
23
|
-
|
|
24
|
-
|
|
51
|
+
/**
|
|
52
|
+
* If there is a / in the last word, do not put asterisk at the end of it.
|
|
53
|
+
*/
|
|
54
|
+
const lastWord = results[results.length - 1];
|
|
55
|
+
if (hasSpecialChar(lastWord) === false) {
|
|
56
|
+
result = `${result}*`;
|
|
57
|
+
}
|
|
58
|
+
return result;
|
|
25
59
|
};
|
|
60
|
+
exports.normalizeValueWithAsterisk = normalizeValueWithAsterisk;
|
|
26
61
|
|
|
27
|
-
|
|
62
|
+
//# sourceMappingURL=normalize.js.map
|
package/normalize.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["specialCharactersToRemove","specialCharacterToSpace","specialCharacters","normalizeValue","value","result","character","replace","RegExp","exports","hasSpecialChar","match","normalizeValueWithAsterisk","initial","results","split","firstWord","lastWord","length"],"sources":["normalize.ts"],"sourcesContent":["/**\n * Before performing the query, we need to escape all special characters.\n * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters\n */\n\nconst specialCharactersToRemove = [`\\\\?`];\n\nconst specialCharacterToSpace = [\"-\"];\n\nconst specialCharacters = [\n \"\\\\\\\\\",\n \"\\\\+\",\n // \"\\\\-\",\n \"\\\\=\",\n `\\&`,\n `\\\\|`,\n \">\",\n \"<\",\n `\\!`,\n \"\\\\(\",\n \"\\\\)\",\n \"\\\\{\",\n \"\\\\}\",\n \"\\\\[\",\n \"\\\\]\",\n \"\\\\^\",\n '\\\\\"',\n \"\\\\~\",\n \"\\\\*\",\n `\\:`,\n `\\/`,\n \"\\\\#\"\n];\n\nexport const normalizeValue = (value: string) => {\n let result = value || \"\";\n if (!result) {\n return result;\n }\n for (const character of specialCharactersToRemove) {\n result = result.replace(new RegExp(character, \"g\"), \"\");\n }\n for (const character of specialCharacterToSpace) {\n result = result.replace(new RegExp(character, \"g\"), \" \");\n }\n\n for (const character of specialCharacters) {\n result = result.replace(new RegExp(character, \"g\"), `\\\\${character}`);\n }\n\n return result || \"\";\n};\n\nconst hasSpecialChar = (value: string): boolean | null => {\n if (!value) {\n return null;\n }\n return value.match(/^([0-9a-zA-Z]+)$/i) === null;\n};\n\nexport const normalizeValueWithAsterisk = (initial: string) => {\n const value = normalizeValue(initial);\n const results = value.split(\" \");\n\n let result = value;\n /**\n * If there is a / in the first word, do not put asterisk in front of it.\n */\n const firstWord = results[0];\n if (hasSpecialChar(firstWord) === false) {\n result = `*${result}`;\n }\n /**\n * If there is a / in the last word, do not put asterisk at the end of it.\n */\n const lastWord = results[results.length - 1];\n if (hasSpecialChar(lastWord) === false) {\n result = `${result}*`;\n }\n\n return result;\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;;AAEA,MAAMA,yBAAyB,GAAG,CAAC,KAAK,CAAC;AAEzC,MAAMC,uBAAuB,GAAG,CAAC,GAAG,CAAC;AAErC,MAAMC,iBAAiB,GAAG,CACtB,MAAM,EACN,KAAK;AACL;AACA,KAAK,EACL,IAAI,EACJ,KAAK,EACL,GAAG,EACH,GAAG,EACH,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,KAAK,CACR;AAEM,MAAMC,cAAc,GAAIC,KAAa,IAAK;EAC7C,IAAIC,MAAM,GAAGD,KAAK,IAAI,EAAE;EACxB,IAAI,CAACC,MAAM,EAAE;IACT,OAAOA,MAAM;EACjB;EACA,KAAK,MAAMC,SAAS,IAAIN,yBAAyB,EAAE;IAC/CK,MAAM,GAAGA,MAAM,CAACE,OAAO,CAAC,IAAIC,MAAM,CAACF,SAAS,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC;EAC3D;EACA,KAAK,MAAMA,SAAS,IAAIL,uBAAuB,EAAE;IAC7CI,MAAM,GAAGA,MAAM,CAACE,OAAO,CAAC,IAAIC,MAAM,CAACF,SAAS,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC;EAC5D;EAEA,KAAK,MAAMA,SAAS,IAAIJ,iBAAiB,EAAE;IACvCG,MAAM,GAAGA,MAAM,CAACE,OAAO,CAAC,IAAIC,MAAM,CAACF,SAAS,EAAE,GAAG,CAAC,EAAE,KAAKA,SAAS,EAAE,CAAC;EACzE;EAEA,OAAOD,MAAM,IAAI,EAAE;AACvB,CAAC;AAACI,OAAA,CAAAN,cAAA,GAAAA,cAAA;AAEF,MAAMO,cAAc,GAAIN,KAAa,IAAqB;EACtD,IAAI,CAACA,KAAK,EAAE;IACR,OAAO,IAAI;EACf;EACA,OAAOA,KAAK,CAACO,KAAK,CAAC,mBAAmB,CAAC,KAAK,IAAI;AACpD,CAAC;AAEM,MAAMC,0BAA0B,GAAIC,OAAe,IAAK;EAC3D,MAAMT,KAAK,GAAGD,cAAc,CAACU,OAAO,CAAC;EACrC,MAAMC,OAAO,GAAGV,KAAK,CAACW,KAAK,CAAC,GAAG,CAAC;EAEhC,IAAIV,MAAM,GAAGD,KAAK;EAClB;AACJ;AACA;EACI,MAAMY,SAAS,GAAGF,OAAO,CAAC,CAAC,CAAC;EAC5B,IAAIJ,cAAc,CAACM,SAAS,CAAC,KAAK,KAAK,EAAE;IACrCX,MAAM,GAAG,IAAIA,MAAM,EAAE;EACzB;EACA;AACJ;AACA;EACI,MAAMY,QAAQ,GAAGH,OAAO,CAACA,OAAO,CAACI,MAAM,GAAG,CAAC,CAAC;EAC5C,IAAIR,cAAc,CAACO,QAAQ,CAAC,KAAK,KAAK,EAAE;IACpCZ,MAAM,GAAG,GAAGA,MAAM,GAAG;EACzB;EAEA,OAAOA,MAAM;AACjB,CAAC;AAACI,OAAA,CAAAG,0BAAA,GAAAA,0BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Client } from "../client";
|
|
2
|
+
import type { IElasticsearchCatHealthResponse } from "./types";
|
|
3
|
+
export declare class ElasticsearchCatHealth {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: Client);
|
|
6
|
+
getHealth(): Promise<IElasticsearchCatHealthResponse>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ElasticsearchCatHealth = void 0;
|
|
7
|
+
var _error = require("@webiny/error");
|
|
8
|
+
var _stripConnectionFromException = require("./stripConnectionFromException");
|
|
9
|
+
class ElasticsearchCatHealth {
|
|
10
|
+
constructor(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async getHealth() {
|
|
14
|
+
try {
|
|
15
|
+
const response = await this.client.cat.health({
|
|
16
|
+
format: "json"
|
|
17
|
+
});
|
|
18
|
+
if (!Array.isArray(response.body) || response.body.length === 0) {
|
|
19
|
+
throw new _error.WebinyError({
|
|
20
|
+
message: `There is no valid response from cat.health operation.`,
|
|
21
|
+
code: "ELASTICSEARCH_HEALTH_INVALID_RESPONSE",
|
|
22
|
+
data: response.body
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
...response.body[0]
|
|
27
|
+
};
|
|
28
|
+
} catch (ex) {
|
|
29
|
+
console.error(`Could not fetch cluster health information: ${ex.message}`);
|
|
30
|
+
const error = (0, _stripConnectionFromException.stripConnectionFromException)(ex);
|
|
31
|
+
console.log(JSON.stringify(error));
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ElasticsearchCatHealth = ElasticsearchCatHealth;
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=ElasticsearchCatHealth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_error","require","_stripConnectionFromException","ElasticsearchCatHealth","constructor","client","getHealth","response","cat","health","format","Array","isArray","body","length","WebinyError","message","code","data","ex","console","error","stripConnectionFromException","log","JSON","stringify","exports"],"sources":["ElasticsearchCatHealth.ts"],"sourcesContent":["import { WebinyError } from \"@webiny/error\";\nimport type { Client } from \"~/client\";\nimport type { IElasticsearchCatHealthResponse } from \"./types\";\nimport { stripConnectionFromException } from \"~/operations/stripConnectionFromException\";\n\nexport class ElasticsearchCatHealth {\n private readonly client: Client;\n\n public constructor(client: Client) {\n this.client = client;\n }\n\n public async getHealth(): Promise<IElasticsearchCatHealthResponse> {\n try {\n const response = await this.client.cat.health<\n unknown | [IElasticsearchCatHealthResponse]\n >({\n format: \"json\"\n });\n\n if (!Array.isArray(response.body) || response.body.length === 0) {\n throw new WebinyError({\n message: `There is no valid response from cat.health operation.`,\n code: \"ELASTICSEARCH_HEALTH_INVALID_RESPONSE\",\n data: response.body\n });\n }\n\n return {\n ...response.body[0]\n };\n } catch (ex) {\n console.error(`Could not fetch cluster health information: ${ex.message}`);\n const error = stripConnectionFromException(ex);\n console.log(JSON.stringify(error));\n throw error;\n }\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,6BAAA,GAAAD,OAAA;AAEO,MAAME,sBAAsB,CAAC;EAGzBC,WAAWA,CAACC,MAAc,EAAE;IAC/B,IAAI,CAACA,MAAM,GAAGA,MAAM;EACxB;EAEA,MAAaC,SAASA,CAAA,EAA6C;IAC/D,IAAI;MACA,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACF,MAAM,CAACG,GAAG,CAACC,MAAM,CAE3C;QACEC,MAAM,EAAE;MACZ,CAAC,CAAC;MAEF,IAAI,CAACC,KAAK,CAACC,OAAO,CAACL,QAAQ,CAACM,IAAI,CAAC,IAAIN,QAAQ,CAACM,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;QAC7D,MAAM,IAAIC,kBAAW,CAAC;UAClBC,OAAO,EAAE,uDAAuD;UAChEC,IAAI,EAAE,uCAAuC;UAC7CC,IAAI,EAAEX,QAAQ,CAACM;QACnB,CAAC,CAAC;MACN;MAEA,OAAO;QACH,GAAGN,QAAQ,CAACM,IAAI,CAAC,CAAC;MACtB,CAAC;IACL,CAAC,CAAC,OAAOM,EAAE,EAAE;MACTC,OAAO,CAACC,KAAK,CAAC,+CAA+CF,EAAE,CAACH,OAAO,EAAE,CAAC;MAC1E,MAAMK,KAAK,GAAG,IAAAC,0DAA4B,EAACH,EAAE,CAAC;MAC9CC,OAAO,CAACG,GAAG,CAACC,IAAI,CAACC,SAAS,CAACJ,KAAK,CAAC,CAAC;MAClC,MAAMA,KAAK;IACf;EACJ;AACJ;AAACK,OAAA,CAAAvB,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IElasticsearchCatNodesResponse } from "./types";
|
|
2
|
+
import type { Client } from "../client";
|
|
3
|
+
export declare class ElasticsearchCatNodes {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: Client);
|
|
6
|
+
getNodes(): Promise<IElasticsearchCatNodesResponse>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ElasticsearchCatNodes = void 0;
|
|
7
|
+
var _error = require("@webiny/error");
|
|
8
|
+
var _stripConnectionFromException = require("./stripConnectionFromException");
|
|
9
|
+
class ElasticsearchCatNodes {
|
|
10
|
+
constructor(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async getNodes() {
|
|
14
|
+
try {
|
|
15
|
+
const response = await this.client.cat.nodes({
|
|
16
|
+
format: "json"
|
|
17
|
+
});
|
|
18
|
+
if (!Array.isArray(response.body) || response.body.length === 0) {
|
|
19
|
+
throw new _error.WebinyError({
|
|
20
|
+
message: `There is no valid response from cat.nodes operation.`,
|
|
21
|
+
code: "ELASTICSEARCH_NODES_INVALID_RESPONSE",
|
|
22
|
+
data: response.body
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return response.body;
|
|
26
|
+
} catch (ex) {
|
|
27
|
+
console.error(`Could not fetch cluster nodes information: ${ex.message}`);
|
|
28
|
+
const error = (0, _stripConnectionFromException.stripConnectionFromException)(ex);
|
|
29
|
+
console.log(JSON.stringify(error));
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.ElasticsearchCatNodes = ElasticsearchCatNodes;
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=ElasticsearchCatNodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_error","require","_stripConnectionFromException","ElasticsearchCatNodes","constructor","client","getNodes","response","cat","nodes","format","Array","isArray","body","length","WebinyError","message","code","data","ex","console","error","stripConnectionFromException","log","JSON","stringify","exports"],"sources":["ElasticsearchCatNodes.ts"],"sourcesContent":["import type { IElasticsearchCatNodesResponse } from \"./types\";\nimport type { Client } from \"~/client\";\nimport { WebinyError } from \"@webiny/error\";\nimport { stripConnectionFromException } from \"~/operations/stripConnectionFromException\";\n\nexport class ElasticsearchCatNodes {\n private readonly client: Client;\n\n public constructor(client: Client) {\n this.client = client;\n }\n\n public async getNodes(): Promise<IElasticsearchCatNodesResponse> {\n try {\n const response = await this.client.cat.nodes<IElasticsearchCatNodesResponse>({\n format: \"json\"\n });\n if (!Array.isArray(response.body) || response.body.length === 0) {\n throw new WebinyError({\n message: `There is no valid response from cat.nodes operation.`,\n code: \"ELASTICSEARCH_NODES_INVALID_RESPONSE\",\n data: response.body\n });\n }\n return response.body;\n } catch (ex) {\n console.error(`Could not fetch cluster nodes information: ${ex.message}`);\n const error = stripConnectionFromException(ex);\n console.log(JSON.stringify(error));\n throw error;\n }\n }\n}\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,6BAAA,GAAAD,OAAA;AAEO,MAAME,qBAAqB,CAAC;EAGxBC,WAAWA,CAACC,MAAc,EAAE;IAC/B,IAAI,CAACA,MAAM,GAAGA,MAAM;EACxB;EAEA,MAAaC,QAAQA,CAAA,EAA4C;IAC7D,IAAI;MACA,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACF,MAAM,CAACG,GAAG,CAACC,KAAK,CAAiC;QACzEC,MAAM,EAAE;MACZ,CAAC,CAAC;MACF,IAAI,CAACC,KAAK,CAACC,OAAO,CAACL,QAAQ,CAACM,IAAI,CAAC,IAAIN,QAAQ,CAACM,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE;QAC7D,MAAM,IAAIC,kBAAW,CAAC;UAClBC,OAAO,EAAE,sDAAsD;UAC/DC,IAAI,EAAE,sCAAsC;UAC5CC,IAAI,EAAEX,QAAQ,CAACM;QACnB,CAAC,CAAC;MACN;MACA,OAAON,QAAQ,CAACM,IAAI;IACxB,CAAC,CAAC,OAAOM,EAAE,EAAE;MACTC,OAAO,CAACC,KAAK,CAAC,8CAA8CF,EAAE,CAACH,OAAO,EAAE,CAAC;MACzE,MAAMK,KAAK,GAAG,IAAAC,0DAA4B,EAACH,EAAE,CAAC;MAC9CC,OAAO,CAACG,GAAG,CAACC,IAAI,CAACC,SAAS,CAACJ,KAAK,CAAC,CAAC;MAClC,MAAMA,KAAK;IACf;EACJ;AACJ;AAACK,OAAA,CAAAvB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _ElasticsearchCatHealth = require("./ElasticsearchCatHealth");
|
|
7
|
+
Object.keys(_ElasticsearchCatHealth).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ElasticsearchCatHealth[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _ElasticsearchCatHealth[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _ElasticsearchCatNodes = require("./ElasticsearchCatNodes");
|
|
18
|
+
Object.keys(_ElasticsearchCatNodes).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _ElasticsearchCatNodes[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _ElasticsearchCatNodes[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _types = require("./types");
|
|
29
|
+
Object.keys(_types).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _types[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_ElasticsearchCatHealth","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_ElasticsearchCatNodes","_types"],"sources":["index.ts"],"sourcesContent":["export * from \"./ElasticsearchCatHealth\";\nexport * from \"./ElasticsearchCatNodes\";\nexport * from \"./types\";\n"],"mappings":";;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,uBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,uBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,uBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,sBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,sBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,sBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,sBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,MAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,MAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,MAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,MAAA,CAAAN,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const stripConnectionFromException: (ex: any) => any;
|