arangojs 8.6.0 → 8.8.0
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/CHANGELOG.md +48 -1
- package/README.md +3 -1
- package/analyzer.d.ts +69 -2
- package/analyzer.d.ts.map +1 -1
- package/analyzer.js.map +1 -1
- package/collection.d.ts +63 -33
- package/collection.d.ts.map +1 -1
- package/collection.js +1 -1
- package/collection.js.map +1 -1
- package/connection.d.ts +5 -5
- package/connection.js +1 -1
- package/connection.js.map +1 -1
- package/database.d.ts +11 -0
- package/database.d.ts.map +1 -1
- package/database.js +4 -1
- package/database.js.map +1 -1
- package/indexes.d.ts +8 -8
- package/indexes.js +1 -1
- package/indexes.js.map +1 -1
- package/package.json +1 -1
- package/web.js +1 -1
- package/web.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,51 @@ This driver uses semantic versioning:
|
|
|
14
14
|
- A change in the major version (e.g. 1.Y.Z -> 2.0.0) indicates _breaking_
|
|
15
15
|
changes that require changes in your code to upgrade.
|
|
16
16
|
|
|
17
|
+
## [8.8.0]
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Renamed ZKD index type to MDI (DE-744)
|
|
22
|
+
|
|
23
|
+
The ZKD index type was previously marked as experimental and has now been
|
|
24
|
+
finalized and renamed to MDI in ArangoDB 3.12.
|
|
25
|
+
|
|
26
|
+
- Added `DocumentOperationMetadata` and `DocumentOperationFailure` types (DE-693)
|
|
27
|
+
|
|
28
|
+
The return types of document and edge operations on collections have been
|
|
29
|
+
modified to correctly represent the return values of bulk operations and
|
|
30
|
+
single document/edge operations using the `overwriteMode` option.
|
|
31
|
+
|
|
32
|
+
### Deprecated
|
|
33
|
+
|
|
34
|
+
- Deprecated active failover support (DE-746)
|
|
35
|
+
|
|
36
|
+
Active failover is no longer be supported in ArangoDB 3.12 and later. This
|
|
37
|
+
functionality will be removed from the driver in a future release.
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- Added support for `multi_delimiter` analyzer type (DE-753)
|
|
42
|
+
|
|
43
|
+
- Added support for `wildcard` analyzer type (DE-750)
|
|
44
|
+
|
|
45
|
+
## [8.7.0] - 2024-02-14
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
|
|
49
|
+
- Made `options` argument in `collection.edges`, `inEdges` and `outEdges` optional ([#802](https://github.com/arangodb/arangojs/issues/802))
|
|
50
|
+
|
|
51
|
+
### Deprecated
|
|
52
|
+
|
|
53
|
+
- Deprecated `db.getLogMessages`
|
|
54
|
+
|
|
55
|
+
This API was deprecated in ArangoDB 3.8 and should no longer be used.
|
|
56
|
+
Use `db.getLogEntries` instead.
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
|
|
60
|
+
- Fixed `db.getLogEntries` using the wrong API endpoint
|
|
61
|
+
|
|
17
62
|
## [8.6.0] - 2023-10-24
|
|
18
63
|
|
|
19
64
|
### Added
|
|
@@ -58,7 +103,7 @@ This driver uses semantic versioning:
|
|
|
58
103
|
|
|
59
104
|
- Fetching additional cursor results now uses `POST` instead of `PUT` (DE-605)
|
|
60
105
|
|
|
61
|
-
The `
|
|
106
|
+
The `PUT` route was deprecated and the `POST` route is supported in all
|
|
62
107
|
actively maintained versions of ArangoDB.
|
|
63
108
|
|
|
64
109
|
- User management methods now use database-relative URLs (DE-606)
|
|
@@ -1743,6 +1788,8 @@ For a detailed list of changes between pre-release versions of v7 see the
|
|
|
1743
1788
|
|
|
1744
1789
|
Graph methods now only return the relevant part of the response body.
|
|
1745
1790
|
|
|
1791
|
+
[8.8.0]: https://github.com/arangodb/arangojs/compare/v8.7.0...v8.8.0
|
|
1792
|
+
[8.7.0]: https://github.com/arangodb/arangojs/compare/v8.6.0...v8.7.0
|
|
1746
1793
|
[8.6.0]: https://github.com/arangodb/arangojs/compare/v8.5.0...v8.6.0
|
|
1747
1794
|
[8.5.0]: https://github.com/arangodb/arangojs/compare/v8.4.1...v8.5.0
|
|
1748
1795
|
[8.4.1]: https://github.com/arangodb/arangojs/compare/v8.4.0...v8.4.1
|
package/README.md
CHANGED
|
@@ -132,7 +132,9 @@ substitute promises for `await` syntax as in the above example.
|
|
|
132
132
|
The arangojs driver is compatible with the latest stable version of ArangoDB
|
|
133
133
|
available at the time of the driver release and remains compatible with the
|
|
134
134
|
two most recent Node.js LTS versions in accordance with the official
|
|
135
|
-
[Node.js long-term support schedule](https://github.com/nodejs/LTS).
|
|
135
|
+
[Node.js long-term support schedule](https://github.com/nodejs/LTS). Versions
|
|
136
|
+
of ArangoDB that have reached their [end of life](https://arangodb.com/subscriptions/end-of-life-notice/)
|
|
137
|
+
by the time of a driver release are explicitly not supported.
|
|
136
138
|
|
|
137
139
|
For a list of changes between recent versions of the driver, see the
|
|
138
140
|
[CHANGELOG](https://arangodb.github.io/arangojs/CHANGELOG).
|
package/analyzer.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare type AnalyzerFeature = "frequency" | "norm" | "position" | "offse
|
|
|
23
23
|
/**
|
|
24
24
|
* Analyzer type and its type-specific properties.
|
|
25
25
|
*/
|
|
26
|
-
export declare type CreateAnalyzerOptions = CreateIdentityAnalyzerOptions | CreateDelimiterAnalyzerOptions | CreateStemAnalyzerOptions | CreateNormAnalyzerOptions | CreateNgramAnalyzerOptions | CreateTextAnalyzerOptions | CreateSegmentationAnalyzerOptions | CreateAqlAnalyzerOptions | CreatePipelineAnalyzerOptions | CreateStopwordsAnalyzerOptions | CreateCollationAnalyzerOptions | CreateMinHashAnalyzerOptions | CreateClassificationAnalyzerOptions | CreateNearestNeighborsAnalyzerOptions | CreateGeoJsonAnalyzerOptions | CreateGeoPointAnalyzerOptions | CreateGeoS2AnalyzerOptions;
|
|
26
|
+
export declare type CreateAnalyzerOptions = CreateIdentityAnalyzerOptions | CreateDelimiterAnalyzerOptions | CreateMultiDelimiterAnalyzerOptions | CreateStemAnalyzerOptions | CreateNormAnalyzerOptions | CreateNgramAnalyzerOptions | CreateTextAnalyzerOptions | CreateSegmentationAnalyzerOptions | CreateAqlAnalyzerOptions | CreatePipelineAnalyzerOptions | CreateStopwordsAnalyzerOptions | CreateCollationAnalyzerOptions | CreateMinHashAnalyzerOptions | CreateClassificationAnalyzerOptions | CreateNearestNeighborsAnalyzerOptions | CreateWildcardAnalyzerOptions | CreateGeoJsonAnalyzerOptions | CreateGeoPointAnalyzerOptions | CreateGeoS2AnalyzerOptions;
|
|
27
27
|
/**
|
|
28
28
|
* Options for creating an Identity Analyzer.
|
|
29
29
|
*/
|
|
@@ -65,6 +65,28 @@ export declare type CreateDelimiterAnalyzerOptions = {
|
|
|
65
65
|
delimiter: string;
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* Options for creating a Multi-Delimiter Analyzer.
|
|
70
|
+
*/
|
|
71
|
+
export declare type CreateMultiDelimiterAnalyzerOptions = {
|
|
72
|
+
/**
|
|
73
|
+
* Type of the Analyzer.
|
|
74
|
+
*/
|
|
75
|
+
type: "multi_delimiter";
|
|
76
|
+
/**
|
|
77
|
+
* Features to enable for this Analyzer.
|
|
78
|
+
*/
|
|
79
|
+
features?: AnalyzerFeature[];
|
|
80
|
+
/**
|
|
81
|
+
* Additional properties for the Analyzer.
|
|
82
|
+
*
|
|
83
|
+
* The value will be used as delimiter to split text into tokens as specified
|
|
84
|
+
* in RFC 4180, without starting new records on newlines.
|
|
85
|
+
*/
|
|
86
|
+
properties: {
|
|
87
|
+
delimiters: string[];
|
|
88
|
+
};
|
|
89
|
+
};
|
|
68
90
|
/**
|
|
69
91
|
* Options for creating a Stem Analyzer.
|
|
70
92
|
*/
|
|
@@ -463,6 +485,32 @@ export declare type CreateNearestNeighborsAnalyzerOptions = {
|
|
|
463
485
|
top_k?: number;
|
|
464
486
|
};
|
|
465
487
|
};
|
|
488
|
+
/**
|
|
489
|
+
* Options for creating a Wildcard Analyzer.
|
|
490
|
+
*/
|
|
491
|
+
export declare type CreateWildcardAnalyzerOptions = {
|
|
492
|
+
/**
|
|
493
|
+
* Type of the Analyzer.
|
|
494
|
+
*/
|
|
495
|
+
type: "wildcard";
|
|
496
|
+
/**
|
|
497
|
+
* Features to enable for this Analyzer.
|
|
498
|
+
*/
|
|
499
|
+
features?: AnalyzerFeature[];
|
|
500
|
+
/**
|
|
501
|
+
* Additional properties for the Analyzer.
|
|
502
|
+
*/
|
|
503
|
+
properties: {
|
|
504
|
+
/**
|
|
505
|
+
* N-gram length. Must be a positive integer greater than or equal to 2.
|
|
506
|
+
*/
|
|
507
|
+
ngramSize: string;
|
|
508
|
+
/**
|
|
509
|
+
* An Analyzer definition-like object with `type` and `properties` attributes.
|
|
510
|
+
*/
|
|
511
|
+
analyzer?: Omit<CreateAnalyzerOptions, "features">;
|
|
512
|
+
};
|
|
513
|
+
};
|
|
466
514
|
/**
|
|
467
515
|
* Options for creating a GeoJSON Analyzer
|
|
468
516
|
*/
|
|
@@ -606,7 +654,7 @@ export declare type GenericAnalyzerDescription = {
|
|
|
606
654
|
/**
|
|
607
655
|
* An object describing an Analyzer.
|
|
608
656
|
*/
|
|
609
|
-
export declare type AnalyzerDescription = IdentityAnalyzerDescription | DelimiterAnalyzerDescription | StemAnalyzerDescription | NormAnalyzerDescription | NgramAnalyzerDescription | TextAnalyzerDescription | SegmentationAnalyzerDescription | AqlAnalyzerDescription | PipelineAnalyzerDescription | StopwordsAnalyzerDescription | CollationAnalyzerDescription | MinHashAnalyzerDescription | ClassificationAnalyzerDescription | NearestNeighborsAnalyzerDescription | GeoJsonAnalyzerDescription | GeoPointAnalyzerDescription | GeoS2AnalyzerDescription;
|
|
657
|
+
export declare type AnalyzerDescription = IdentityAnalyzerDescription | DelimiterAnalyzerDescription | MultiDelimiterAnalyzerDescription | StemAnalyzerDescription | NormAnalyzerDescription | NgramAnalyzerDescription | TextAnalyzerDescription | SegmentationAnalyzerDescription | AqlAnalyzerDescription | PipelineAnalyzerDescription | StopwordsAnalyzerDescription | CollationAnalyzerDescription | MinHashAnalyzerDescription | ClassificationAnalyzerDescription | NearestNeighborsAnalyzerDescription | WildcardAnalyzerDescription | GeoJsonAnalyzerDescription | GeoPointAnalyzerDescription | GeoS2AnalyzerDescription;
|
|
610
658
|
/**
|
|
611
659
|
* An object describing an Identity Analyzer.
|
|
612
660
|
*/
|
|
@@ -623,6 +671,15 @@ export declare type DelimiterAnalyzerDescription = GenericAnalyzerDescription &
|
|
|
623
671
|
delimiter: string;
|
|
624
672
|
};
|
|
625
673
|
};
|
|
674
|
+
/**
|
|
675
|
+
* An object describing a Multi Delimiter Analyzer.
|
|
676
|
+
*/
|
|
677
|
+
export declare type MultiDelimiterAnalyzerDescription = GenericAnalyzerDescription & {
|
|
678
|
+
type: "multi_delimiter";
|
|
679
|
+
properties: {
|
|
680
|
+
delimiters: string[];
|
|
681
|
+
};
|
|
682
|
+
};
|
|
626
683
|
/**
|
|
627
684
|
* An object describing a Stem Analyzer.
|
|
628
685
|
*/
|
|
@@ -756,6 +813,16 @@ export declare type NearestNeighborsAnalyzerDescription = GenericAnalyzerDescrip
|
|
|
756
813
|
top_k: number;
|
|
757
814
|
};
|
|
758
815
|
};
|
|
816
|
+
/**
|
|
817
|
+
* An object describing a Wildcard Analyzer
|
|
818
|
+
*/
|
|
819
|
+
export declare type WildcardAnalyzerDescription = GenericAnalyzerDescription & {
|
|
820
|
+
type: "wildcard";
|
|
821
|
+
properties: {
|
|
822
|
+
ngramSize: number;
|
|
823
|
+
analyzer?: Omit<AnalyzerDescription, "name" | "features">;
|
|
824
|
+
};
|
|
825
|
+
};
|
|
759
826
|
/**
|
|
760
827
|
* An object describing a GeoJSON Analyzer
|
|
761
828
|
*/
|
package/analyzer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../src/analyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD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AAQ,KAAK,0BAAkB,EAAE;gBAC7D,OAAO,KAAK,CAAC;aACd;YACD,MAAM,GAAG,CAAC;SACX;IACH,CAAC;IAED;;;;;;;;;;OAUG;IACH,GAAG;QACD,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YACtB,IAAI,EAAE,kBAAkB,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;SACzD,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,OAAgB;QAsChB,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YACtB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,OAAO,EAAE;SACvC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,QAAiB,KAAK;QACzB,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YACtB,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,kBAAkB,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YACxD,EAAE,EAAE,EAAE,KAAK,EAAE;SACd,CAAC,CAAC;IACL,CAAC;CACF;AAxJD,4BAwJC","sourcesContent":["/**\n * ```ts\n * import type { Analyzer } from \"arangojs/analyzer\";\n * ```\n *\n * The \"analyzer\" module provides analyzer related types and interfaces\n * for TypeScript.\n *\n * @packageDocumentation\n */\nimport { ArangoApiResponse } from \"./connection\";\nimport { Database } from \"./database\";\nimport { isArangoError } from \"./error\";\nimport { ANALYZER_NOT_FOUND } from \"./lib/codes\";\n\n/**\n * Indicates whether the given value represents an {@link Analyzer}.\n *\n * @param analyzer - A value that might be an Analyzer.\n */\nexport function isArangoAnalyzer(analyzer: any): analyzer is Analyzer {\n return Boolean(analyzer && analyzer.isArangoAnalyzer);\n}\n\n/**\n * Name of a feature enabled for an Analyzer.\n */\nexport type AnalyzerFeature = \"frequency\" | \"norm\" | \"position\" | \"offset\";\n\n/**\n * Analyzer type and its type-specific properties.\n */\nexport type CreateAnalyzerOptions =\n | CreateIdentityAnalyzerOptions\n | CreateDelimiterAnalyzerOptions\n | CreateStemAnalyzerOptions\n | CreateNormAnalyzerOptions\n | CreateNgramAnalyzerOptions\n | CreateTextAnalyzerOptions\n | CreateSegmentationAnalyzerOptions\n | CreateAqlAnalyzerOptions\n | CreatePipelineAnalyzerOptions\n | CreateStopwordsAnalyzerOptions\n | CreateCollationAnalyzerOptions\n | CreateMinHashAnalyzerOptions\n | CreateClassificationAnalyzerOptions\n | CreateNearestNeighborsAnalyzerOptions\n | CreateGeoJsonAnalyzerOptions\n | CreateGeoPointAnalyzerOptions\n | CreateGeoS2AnalyzerOptions;\n\n/**\n * Options for creating an Identity Analyzer.\n */\nexport type CreateIdentityAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"identity\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n *\n * The `identity` Analyzer does not take additional properties.\n */\n properties?: Record<string, never>;\n};\n\n/**\n * Options for creating a Delimiter Analyzer.\n */\nexport type CreateDelimiterAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"delimiter\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n *\n * The value will be used as delimiter to split text into tokens as specified\n * in RFC 4180, without starting new records on newlines.\n */\n properties: string | { delimiter: string };\n};\n\n/**\n * Options for creating a Stem Analyzer.\n */\nexport type CreateStemAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"stem\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n *\n * The value defines the text locale.\n *\n * Format: `language[_COUNTRY][.encoding][@variant]`\n */\n properties: { locale: string };\n};\n\n/**\n * Options for creating a Norm Analyzer.\n */\nexport type CreateNormAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"norm\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Text locale.\n *\n * Format: `language[_COUNTRY][.encoding][@variant]`\n */\n locale: string;\n /**\n * Case conversion.\n *\n * Default: `\"lower\"`\n */\n case?: \"lower\" | \"none\" | \"upper\";\n /**\n * Preserve accents in returned words.\n *\n * Default: `false`\n */\n accent?: boolean;\n };\n};\n\n/**\n * Options for creating an Ngram Analyzer.\n */\nexport type CreateNgramAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"ngram\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Maximum n-gram length.\n */\n max: number;\n /**\n * Minimum n-gram length.\n */\n min: number;\n /**\n * Output the original value as well.\n */\n preserveOriginal: boolean;\n };\n};\n\n/**\n * Options for creating a Text Analyzer.\n */\nexport type CreateTextAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"text\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Text locale.\n *\n * Format: `language[_COUNTRY][.encoding][@variant]`\n */\n locale: string;\n /**\n * Case conversion.\n *\n * Default: `\"lower\"`\n */\n case?: \"lower\" | \"none\" | \"upper\";\n /**\n * Words to omit from result.\n *\n * Defaults to the words loaded from the file at `stopwordsPath`.\n */\n stopwords?: string[];\n /**\n * Path with a `language` sub-directory containing files with words to omit.\n *\n * Defaults to the path specified in the server-side environment variable\n * `IRESEARCH_TEXT_STOPWORD_PATH` or the current working directory of the\n * ArangoDB process.\n */\n stopwordsPath?: string;\n /**\n * Preserve accents in returned words.\n *\n * Default: `false`\n */\n accent?: boolean;\n /**\n * Apply stemming on returned words.\n *\n * Default: `true`\n */\n stemming?: boolean;\n /**\n * If present, then edge n-grams are generated for each token (word).\n */\n edgeNgram?: { min?: number; max?: number; preserveOriginal?: boolean };\n };\n};\n\n/**\n * Options for creating a Segmentation Analyzer\n */\nexport type CreateSegmentationAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"segmentation\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Which tokens should be returned.\n *\n * Default: `\"alpha\"`\n */\n break?: \"all\" | \"alpha\" | \"graphic\";\n /**\n * What case all returned tokens should be converted to if applicable.\n *\n * Default: `\"none\"`\n */\n case?: \"lower\" | \"upper\" | \"none\";\n };\n};\n\n/**\n * Options for creating an AQL Analyzer\n */\nexport type CreateAqlAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"aql\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * AQL query to be executed.\n */\n queryString: string;\n /**\n * If set to `true`, the position is set to `0` for all members of the query result array.\n *\n * Default: `false`\n */\n collapsePositions?: boolean;\n /**\n * If set to `false`, `null` values will be discarded from the View index.\n *\n * Default: `true`\n */\n keepNull?: boolean;\n /**\n * Number between `1` and `1000` that determines the batch size for reading\n * data from the query.\n *\n * Default: `1`\n */\n batchSize?: number;\n /**\n * Memory limit for query execution in bytes.\n *\n * Default: `1048576` (1 MiB)\n */\n memoryLimit?: number;\n /**\n * Data type of the returned tokens.\n *\n * Default: `\"string\"`\n */\n returnType?: \"string\" | \"number\" | \"bool\";\n };\n};\n\n/**\n * Options for creating a Pipeline Analyzer\n */\nexport type CreatePipelineAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"pipeline\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Definitions for Analyzers to chain in this Pipeline Analyzer.\n */\n pipeline: Omit<CreateAnalyzerOptions, \"features\">[];\n };\n};\n\n/**\n * Options for creating a Stopwords Analyzer\n */\nexport type CreateStopwordsAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"stopwords\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Array of strings that describe the tokens to be discarded.\n */\n stopwords: string[];\n /**\n * Whether stopword values should be interpreted as hex-encoded strings.\n *\n * Default: `false`\n */\n hex?: boolean;\n };\n};\n\n/**\n * Options for creating a Collation Analyzer\n */\nexport type CreateCollationAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"collation\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Text locale.\n *\n * Format: `language[_COUNTRY][.encoding][@variant]`\n */\n locale: string;\n };\n};\n\n/**\n * (Enterprise Edition only.) Options for creating a MinHash Analyzer\n */\nexport type CreateMinHashAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"minhash\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * An Analyzer definition-like object with `type` and `properties` attributes.\n */\n analyzer: Omit<CreateAnalyzerOptions, \"features\">;\n /**\n * Size of the MinHash signature.\n */\n numHashes: number;\n };\n};\n\n/**\n * (Enterprise Edition only.) Options for creating a Classification Analyzer\n */\nexport type CreateClassificationAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"classification\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * On-disk path to the trained fastText supervised model.\n */\n model_location: string;\n /**\n * Number of class labels that will be produced per input.\n *\n * Default: `1`\n */\n top_k?: number;\n /**\n * Probability threshold for which a label will be assigned to an input.\n *\n * Default: `0.99`\n */\n threshold?: number;\n };\n};\n\n/**\n * (Enterprise Edition only.) Options for creating a NearestNeighbors Analyzer.\n */\nexport type CreateNearestNeighborsAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"nearest_neighbors\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * On-disk path to the trained fastText supervised model.\n */\n model_location: string;\n /**\n * Number of class labels that will be produced per input.\n *\n * Default: `1`\n */\n top_k?: number;\n };\n};\n\n/**\n * Options for creating a GeoJSON Analyzer\n */\nexport type CreateGeoJsonAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"geojson\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * If set to `\"centroid\"`, only the centroid of the input geometry will be\n * computed and indexed.\n *\n * If set to `\"point\"` only GeoJSON objects of type Point will be indexed and\n * all other geometry types will be ignored.\n *\n * Default: `\"shape\"`\n */\n type?: \"shape\" | \"centroid\" | \"point\";\n /**\n * Options for fine-tuning geo queries.\n *\n * Default: `{ maxCells: 20, minLevel: 4, maxLevel: 23 }`\n */\n options?: { maxCells?: number; minLevel?: number; maxLevel?: number };\n };\n};\n\n/**\n * Options for creating a GeoPoint Analyzer\n */\nexport type CreateGeoPointAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"geopoint\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Attribute paths of the latitude value relative to the field for which the\n * Analyzer is defined in the View.\n */\n latitude?: string[];\n /**\n * Attribute paths of the longitude value relative to the field for which the\n * Analyzer is defined in the View.\n */\n longitude?: string[];\n /**\n * Options for fine-tuning geo queries.\n *\n * Default: `{ maxCells: 20, minLevel: 4, maxLevel: 23 }`\n */\n options?: { minCells?: number; minLevel?: number; maxLevel?: number };\n };\n};\n\n/**\n * (Enterprise Edition only.) Options for creating a Geo S2 Analyzer\n */\nexport type CreateGeoS2AnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"geo_s2\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * If set to `\"centroid\"`, only the centroid of the input geometry will be\n * computed and indexed.\n *\n * If set to `\"point\"` only GeoJSON objects of type Point will be indexed and\n * all other geometry types will be ignored.\n *\n * Default: `\"shape\"`\n */\n type?: \"shape\" | \"centroid\" | \"point\";\n /**\n * Options for fine-tuning geo queries.\n *\n * Default: `{ maxCells: 20, minLevel: 4, maxLevel: 23 }`\n */\n options?: { maxCells?: number; minLevel?: number; maxLevel?: number };\n /**\n * If set to `\"latLngDouble\"`, each latitude and longitude value is stored\n * as an 8-byte floating-point value (16 bytes per coordinate pair).\n *\n * If set to `\"latLngInt\"`, each latitude and longitude value is stored as\n * a 4-byte integer value (8 bytes per coordinate pair).\n *\n * If set to `\"s2Point\"`, each longitude-latitude pair is stored in the\n * native format of Google S2 (24 bytes per coordinate pair).\n *\n * Default: `\"latLngDouble\"`\n */\n format?: \"latLngDouble\" | \"latLngInt\" | \"s2Point\";\n };\n};\n\n/**\n * Shared attributes of all Analyzer descriptions.\n */\nexport type GenericAnalyzerDescription = {\n /**\n * A unique name for this Analyzer.\n */\n name: string;\n /**\n * Features enabled for this Analyzer.\n */\n features: AnalyzerFeature[];\n};\n\n/**\n * An object describing an Analyzer.\n */\nexport type AnalyzerDescription =\n | IdentityAnalyzerDescription\n | DelimiterAnalyzerDescription\n | StemAnalyzerDescription\n | NormAnalyzerDescription\n | NgramAnalyzerDescription\n | TextAnalyzerDescription\n | SegmentationAnalyzerDescription\n | AqlAnalyzerDescription\n | PipelineAnalyzerDescription\n | StopwordsAnalyzerDescription\n | CollationAnalyzerDescription\n | MinHashAnalyzerDescription\n | ClassificationAnalyzerDescription\n | NearestNeighborsAnalyzerDescription\n | GeoJsonAnalyzerDescription\n | GeoPointAnalyzerDescription\n | GeoS2AnalyzerDescription;\n\n/**\n * An object describing an Identity Analyzer.\n */\nexport type IdentityAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"identity\";\n properties: Record<string, never>;\n};\n\n/**\n * An object describing a Delimiter Analyzer.\n */\nexport type DelimiterAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"delimiter\";\n properties: { delimiter: string };\n};\n\n/**\n * An object describing a Stem Analyzer.\n */\nexport type StemAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"stem\";\n properties: { locale: string };\n};\n\n/**\n * An object describing a Norm Analyzer.\n */\nexport type NormAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"norm\";\n properties: {\n locale: string;\n case: \"lower\" | \"none\" | \"upper\";\n accent: boolean;\n };\n};\n\n/**\n * An object describing an Ngram Analyzer.\n */\nexport type NgramAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"ngram\";\n properties: {\n max: number;\n min: number;\n preserveOriginal: boolean;\n };\n};\n\n/**\n * An object describing a Text Analyzer.\n */\nexport type TextAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"text\";\n properties: {\n locale: string;\n case: \"lower\" | \"none\" | \"upper\";\n stopwords: string[];\n stopwordsPath: string;\n accent: boolean;\n stemming: boolean;\n edgeNgram: { min: number; max: number; preserveOriginal: boolean };\n };\n};\n\n/**\n * An object describing a Segmentation Analyzer\n */\nexport type SegmentationAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"segmentation\";\n properties: {\n break: \"all\" | \"alpha\" | \"graphic\";\n case: \"lower\" | \"upper\" | \"none\";\n };\n};\n\n/**\n * An object describing an AQL Analyzer\n */\nexport type AqlAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"aql\";\n properties: {\n queryString: string;\n collapsePositions: boolean;\n keepNull: boolean;\n batchSize: number;\n memoryLimit: number;\n returnType: \"string\" | \"number\" | \"bool\";\n };\n};\n\n/**\n * An object describing a Pipeline Analyzer\n */\nexport type PipelineAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"pipeline\";\n properties: {\n pipeline: Omit<AnalyzerDescription, \"name\" | \"features\">[];\n };\n};\n\n/**\n * An object describing a Stopwords Analyzer\n */\nexport type StopwordsAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"stopwords\";\n properties: {\n stopwords: string[];\n hex: boolean;\n };\n};\n\n/**\n * An object describing a Collation Analyzer\n */\nexport type CollationAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"collation\";\n properties: {\n locale: string;\n };\n};\n\n/**\n * (Enterprise Edition only.) An object describing a MinHash Analyzer\n */\nexport type MinHashAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"minhash\";\n properties: {\n analyzer: Omit<AnalyzerDescription, \"name\" | \"features\">;\n numHashes: number;\n };\n};\n\n/**\n * (Enterprise Edition only.) An object describing a Classification Analyzer\n */\nexport type ClassificationAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"classification\";\n properties: {\n model_location: string;\n top_k: number;\n threshold: number;\n };\n};\n\n/**\n * (Enterprise Edition only.) An object describing a NearestNeighbors Analyzer\n */\nexport type NearestNeighborsAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"nearest_neighbors\";\n properties: {\n model_location: string;\n top_k: number;\n };\n};\n\n/**\n * An object describing a GeoJSON Analyzer\n */\nexport type GeoJsonAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"geojson\";\n properties: {\n type: \"shape\" | \"centroid\" | \"point\";\n description: { maxCells: number; minLevel: number; maxLevel: number };\n };\n};\n\n/**\n * An object describing a GeoPoint Analyzer\n */\nexport type GeoPointAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"geopoint\";\n properties: {\n latitude: string[];\n longitude: string[];\n description: { minCells: number; minLevel: number; maxLevel: number };\n };\n};\n\n/**\n * (Enterprise Edition only.) An object describing a GeoS2 Analyzer\n */\nexport type GeoS2AnalyzerDescription = GenericAnalyzerDescription & {\n type: \"geo_s2\";\n properties: {\n type: \"shape\" | \"centroid\" | \"point\";\n description: { maxCells: number; minLevel: number; maxLevel: number };\n format: \"latLngDouble\" | \"latLngInt\" | \"s2Point\";\n };\n};\n\n/**\n * Represents an Analyzer in a {@link database.Database}.\n */\nexport class Analyzer {\n protected _name: string;\n protected _db: Database;\n\n /**\n * @internal\n */\n constructor(db: Database, name: string) {\n this._db = db;\n this._name = name.normalize(\"NFC\");\n }\n\n /**\n * @internal\n *\n * Indicates that this object represents an ArangoDB Analyzer.\n */\n get isArangoAnalyzer(): true {\n return true;\n }\n\n /**\n * Name of this Analyzer.\n *\n * See also {@link database.Database}.\n */\n get name() {\n return this._name;\n }\n\n /**\n * Checks whether the Analyzer exists.\n *\n * @example\n * ```js\n * const db = new Database();\n * const analyzer = db.analyzer(\"some-analyzer\");\n * const result = await analyzer.exists();\n * // result indicates whether the Analyzer exists\n * ```\n */\n async exists(): Promise<boolean> {\n try {\n await this.get();\n return true;\n } catch (err: any) {\n if (isArangoError(err) && err.errorNum === ANALYZER_NOT_FOUND) {\n return false;\n }\n throw err;\n }\n }\n\n /**\n * Retrieves the Analyzer definition for the Analyzer.\n *\n * @example\n * ```js\n * const db = new Database();\n * const analyzer = db.analyzer(\"some-analyzer\");\n * const definition = await analyzer.get();\n * // definition contains the Analyzer definition\n * ```\n */\n get(): Promise<ArangoApiResponse<AnalyzerDescription>> {\n return this._db.request({\n path: `/_api/analyzer/${encodeURIComponent(this._name)}`,\n });\n }\n\n /**\n * Creates a new Analyzer with the given `options` and the instance's name.\n *\n * See also {@link database.Database#createAnalyzer}.\n *\n * @param options - Options for creating the Analyzer.\n *\n * @example\n * ```js\n * const db = new Database();\n * const analyzer = db.analyzer(\"potatoes\");\n * await analyzer.create({ type: \"identity\" });\n * // the identity Analyzer \"potatoes\" now exists\n * ```\n */\n create<Options extends CreateAnalyzerOptions>(\n options: Options\n ): Promise<\n Options extends CreateIdentityAnalyzerOptions\n ? IdentityAnalyzerDescription\n : Options extends CreateDelimiterAnalyzerOptions\n ? DelimiterAnalyzerDescription\n : Options extends CreateStemAnalyzerOptions\n ? StemAnalyzerDescription\n : Options extends CreateNormAnalyzerOptions\n ? NormAnalyzerDescription\n : Options extends CreateNgramAnalyzerOptions\n ? NgramAnalyzerDescription\n : Options extends CreateTextAnalyzerOptions\n ? TextAnalyzerDescription\n : Options extends CreateSegmentationAnalyzerOptions\n ? SegmentationAnalyzerDescription\n : Options extends CreateAqlAnalyzerOptions\n ? AqlAnalyzerDescription\n : Options extends CreatePipelineAnalyzerOptions\n ? PipelineAnalyzerDescription\n : Options extends CreateStopwordsAnalyzerOptions\n ? StopwordsAnalyzerDescription\n : Options extends CreateCollationAnalyzerOptions\n ? CollationAnalyzerDescription\n : Options extends CreateMinHashAnalyzerOptions\n ? MinHashAnalyzerDescription\n : Options extends CreateClassificationAnalyzerOptions\n ? ClassificationAnalyzerDescription\n : Options extends CreateNearestNeighborsAnalyzerOptions\n ? NearestNeighborsAnalyzerDescription\n : Options extends CreateGeoJsonAnalyzerOptions\n ? GeoJsonAnalyzerDescription\n : Options extends CreateGeoPointAnalyzerOptions\n ? GeoPointAnalyzerDescription\n : Options extends CreateGeoS2AnalyzerOptions\n ? GeoS2AnalyzerDescription\n : AnalyzerDescription\n > {\n return this._db.request({\n method: \"POST\",\n path: \"/_api/analyzer\",\n body: { name: this._name, ...options },\n });\n }\n\n /**\n * Deletes the Analyzer from the database.\n *\n * @param force - Whether the Analyzer should still be deleted even if it\n * is currently in use.\n *\n * @example\n * ```js\n * const db = new Database();\n * const analyzer = db.analyzer(\"some-analyzer\");\n * await analyzer.drop();\n * // the Analyzer \"some-analyzer\" no longer exists\n * ```\n */\n drop(force: boolean = false): Promise<ArangoApiResponse<{ name: string }>> {\n return this._db.request({\n method: \"DELETE\",\n path: `/_api/analyzer/${encodeURIComponent(this._name)}`,\n qs: { force },\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"analyzer.js","sourceRoot":"","sources":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I,CAAC,KAAK,EAAE,GAAG,OAAO,EAAE;SACvC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,QAAiB,KAAK;QACzB,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YACtB,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,kBAAkB,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YACxD,EAAE,EAAE,EAAE,KAAK,EAAE;SACd,CAAC,CAAC;IACL,CAAC;CACF;AAxJD,4BAwJC","sourcesContent":["/**\n * ```ts\n * import type { Analyzer } from \"arangojs/analyzer\";\n * ```\n *\n * The \"analyzer\" module provides analyzer related types and interfaces\n * for TypeScript.\n *\n * @packageDocumentation\n */\nimport { ArangoApiResponse } from \"./connection\";\nimport { Database } from \"./database\";\nimport { isArangoError } from \"./error\";\nimport { ANALYZER_NOT_FOUND } from \"./lib/codes\";\n\n/**\n * Indicates whether the given value represents an {@link Analyzer}.\n *\n * @param analyzer - A value that might be an Analyzer.\n */\nexport function isArangoAnalyzer(analyzer: any): analyzer is Analyzer {\n return Boolean(analyzer && analyzer.isArangoAnalyzer);\n}\n\n/**\n * Name of a feature enabled for an Analyzer.\n */\nexport type AnalyzerFeature = \"frequency\" | \"norm\" | \"position\" | \"offset\";\n\n/**\n * Analyzer type and its type-specific properties.\n */\nexport type CreateAnalyzerOptions =\n | CreateIdentityAnalyzerOptions\n | CreateDelimiterAnalyzerOptions\n | CreateMultiDelimiterAnalyzerOptions\n | CreateStemAnalyzerOptions\n | CreateNormAnalyzerOptions\n | CreateNgramAnalyzerOptions\n | CreateTextAnalyzerOptions\n | CreateSegmentationAnalyzerOptions\n | CreateAqlAnalyzerOptions\n | CreatePipelineAnalyzerOptions\n | CreateStopwordsAnalyzerOptions\n | CreateCollationAnalyzerOptions\n | CreateMinHashAnalyzerOptions\n | CreateClassificationAnalyzerOptions\n | CreateNearestNeighborsAnalyzerOptions\n | CreateWildcardAnalyzerOptions\n | CreateGeoJsonAnalyzerOptions\n | CreateGeoPointAnalyzerOptions\n | CreateGeoS2AnalyzerOptions;\n\n/**\n * Options for creating an Identity Analyzer.\n */\nexport type CreateIdentityAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"identity\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n *\n * The `identity` Analyzer does not take additional properties.\n */\n properties?: Record<string, never>;\n};\n\n/**\n * Options for creating a Delimiter Analyzer.\n */\nexport type CreateDelimiterAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"delimiter\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n *\n * The value will be used as delimiter to split text into tokens as specified\n * in RFC 4180, without starting new records on newlines.\n */\n properties: string | { delimiter: string };\n};\n\n/**\n * Options for creating a Multi-Delimiter Analyzer.\n */\nexport type CreateMultiDelimiterAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"multi_delimiter\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n *\n * The value will be used as delimiter to split text into tokens as specified\n * in RFC 4180, without starting new records on newlines.\n */\n properties: { delimiters: string[] };\n};\n\n/**\n * Options for creating a Stem Analyzer.\n */\nexport type CreateStemAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"stem\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n *\n * The value defines the text locale.\n *\n * Format: `language[_COUNTRY][.encoding][@variant]`\n */\n properties: { locale: string };\n};\n\n/**\n * Options for creating a Norm Analyzer.\n */\nexport type CreateNormAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"norm\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Text locale.\n *\n * Format: `language[_COUNTRY][.encoding][@variant]`\n */\n locale: string;\n /**\n * Case conversion.\n *\n * Default: `\"lower\"`\n */\n case?: \"lower\" | \"none\" | \"upper\";\n /**\n * Preserve accents in returned words.\n *\n * Default: `false`\n */\n accent?: boolean;\n };\n};\n\n/**\n * Options for creating an Ngram Analyzer.\n */\nexport type CreateNgramAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"ngram\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Maximum n-gram length.\n */\n max: number;\n /**\n * Minimum n-gram length.\n */\n min: number;\n /**\n * Output the original value as well.\n */\n preserveOriginal: boolean;\n };\n};\n\n/**\n * Options for creating a Text Analyzer.\n */\nexport type CreateTextAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"text\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Text locale.\n *\n * Format: `language[_COUNTRY][.encoding][@variant]`\n */\n locale: string;\n /**\n * Case conversion.\n *\n * Default: `\"lower\"`\n */\n case?: \"lower\" | \"none\" | \"upper\";\n /**\n * Words to omit from result.\n *\n * Defaults to the words loaded from the file at `stopwordsPath`.\n */\n stopwords?: string[];\n /**\n * Path with a `language` sub-directory containing files with words to omit.\n *\n * Defaults to the path specified in the server-side environment variable\n * `IRESEARCH_TEXT_STOPWORD_PATH` or the current working directory of the\n * ArangoDB process.\n */\n stopwordsPath?: string;\n /**\n * Preserve accents in returned words.\n *\n * Default: `false`\n */\n accent?: boolean;\n /**\n * Apply stemming on returned words.\n *\n * Default: `true`\n */\n stemming?: boolean;\n /**\n * If present, then edge n-grams are generated for each token (word).\n */\n edgeNgram?: { min?: number; max?: number; preserveOriginal?: boolean };\n };\n};\n\n/**\n * Options for creating a Segmentation Analyzer\n */\nexport type CreateSegmentationAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"segmentation\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Which tokens should be returned.\n *\n * Default: `\"alpha\"`\n */\n break?: \"all\" | \"alpha\" | \"graphic\";\n /**\n * What case all returned tokens should be converted to if applicable.\n *\n * Default: `\"none\"`\n */\n case?: \"lower\" | \"upper\" | \"none\";\n };\n};\n\n/**\n * Options for creating an AQL Analyzer\n */\nexport type CreateAqlAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"aql\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * AQL query to be executed.\n */\n queryString: string;\n /**\n * If set to `true`, the position is set to `0` for all members of the query result array.\n *\n * Default: `false`\n */\n collapsePositions?: boolean;\n /**\n * If set to `false`, `null` values will be discarded from the View index.\n *\n * Default: `true`\n */\n keepNull?: boolean;\n /**\n * Number between `1` and `1000` that determines the batch size for reading\n * data from the query.\n *\n * Default: `1`\n */\n batchSize?: number;\n /**\n * Memory limit for query execution in bytes.\n *\n * Default: `1048576` (1 MiB)\n */\n memoryLimit?: number;\n /**\n * Data type of the returned tokens.\n *\n * Default: `\"string\"`\n */\n returnType?: \"string\" | \"number\" | \"bool\";\n };\n};\n\n/**\n * Options for creating a Pipeline Analyzer\n */\nexport type CreatePipelineAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"pipeline\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Definitions for Analyzers to chain in this Pipeline Analyzer.\n */\n pipeline: Omit<CreateAnalyzerOptions, \"features\">[];\n };\n};\n\n/**\n * Options for creating a Stopwords Analyzer\n */\nexport type CreateStopwordsAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"stopwords\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Array of strings that describe the tokens to be discarded.\n */\n stopwords: string[];\n /**\n * Whether stopword values should be interpreted as hex-encoded strings.\n *\n * Default: `false`\n */\n hex?: boolean;\n };\n};\n\n/**\n * Options for creating a Collation Analyzer\n */\nexport type CreateCollationAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"collation\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Text locale.\n *\n * Format: `language[_COUNTRY][.encoding][@variant]`\n */\n locale: string;\n };\n};\n\n/**\n * (Enterprise Edition only.) Options for creating a MinHash Analyzer\n */\nexport type CreateMinHashAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"minhash\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * An Analyzer definition-like object with `type` and `properties` attributes.\n */\n analyzer: Omit<CreateAnalyzerOptions, \"features\">;\n /**\n * Size of the MinHash signature.\n */\n numHashes: number;\n };\n};\n\n/**\n * (Enterprise Edition only.) Options for creating a Classification Analyzer\n */\nexport type CreateClassificationAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"classification\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * On-disk path to the trained fastText supervised model.\n */\n model_location: string;\n /**\n * Number of class labels that will be produced per input.\n *\n * Default: `1`\n */\n top_k?: number;\n /**\n * Probability threshold for which a label will be assigned to an input.\n *\n * Default: `0.99`\n */\n threshold?: number;\n };\n};\n\n/**\n * (Enterprise Edition only.) Options for creating a NearestNeighbors Analyzer.\n */\nexport type CreateNearestNeighborsAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"nearest_neighbors\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * On-disk path to the trained fastText supervised model.\n */\n model_location: string;\n /**\n * Number of class labels that will be produced per input.\n *\n * Default: `1`\n */\n top_k?: number;\n };\n};\n\n/**\n * Options for creating a Wildcard Analyzer.\n */\nexport type CreateWildcardAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"wildcard\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * N-gram length. Must be a positive integer greater than or equal to 2.\n */\n ngramSize: string;\n /**\n * An Analyzer definition-like object with `type` and `properties` attributes.\n */\n analyzer?: Omit<CreateAnalyzerOptions, \"features\">;\n };\n};\n\n/**\n * Options for creating a GeoJSON Analyzer\n */\nexport type CreateGeoJsonAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"geojson\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * If set to `\"centroid\"`, only the centroid of the input geometry will be\n * computed and indexed.\n *\n * If set to `\"point\"` only GeoJSON objects of type Point will be indexed and\n * all other geometry types will be ignored.\n *\n * Default: `\"shape\"`\n */\n type?: \"shape\" | \"centroid\" | \"point\";\n /**\n * Options for fine-tuning geo queries.\n *\n * Default: `{ maxCells: 20, minLevel: 4, maxLevel: 23 }`\n */\n options?: { maxCells?: number; minLevel?: number; maxLevel?: number };\n };\n};\n\n/**\n * Options for creating a GeoPoint Analyzer\n */\nexport type CreateGeoPointAnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"geopoint\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * Attribute paths of the latitude value relative to the field for which the\n * Analyzer is defined in the View.\n */\n latitude?: string[];\n /**\n * Attribute paths of the longitude value relative to the field for which the\n * Analyzer is defined in the View.\n */\n longitude?: string[];\n /**\n * Options for fine-tuning geo queries.\n *\n * Default: `{ maxCells: 20, minLevel: 4, maxLevel: 23 }`\n */\n options?: { minCells?: number; minLevel?: number; maxLevel?: number };\n };\n};\n\n/**\n * (Enterprise Edition only.) Options for creating a Geo S2 Analyzer\n */\nexport type CreateGeoS2AnalyzerOptions = {\n /**\n * Type of the Analyzer.\n */\n type: \"geo_s2\";\n /**\n * Features to enable for this Analyzer.\n */\n features?: AnalyzerFeature[];\n /**\n * Additional properties for the Analyzer.\n */\n properties: {\n /**\n * If set to `\"centroid\"`, only the centroid of the input geometry will be\n * computed and indexed.\n *\n * If set to `\"point\"` only GeoJSON objects of type Point will be indexed and\n * all other geometry types will be ignored.\n *\n * Default: `\"shape\"`\n */\n type?: \"shape\" | \"centroid\" | \"point\";\n /**\n * Options for fine-tuning geo queries.\n *\n * Default: `{ maxCells: 20, minLevel: 4, maxLevel: 23 }`\n */\n options?: { maxCells?: number; minLevel?: number; maxLevel?: number };\n /**\n * If set to `\"latLngDouble\"`, each latitude and longitude value is stored\n * as an 8-byte floating-point value (16 bytes per coordinate pair).\n *\n * If set to `\"latLngInt\"`, each latitude and longitude value is stored as\n * a 4-byte integer value (8 bytes per coordinate pair).\n *\n * If set to `\"s2Point\"`, each longitude-latitude pair is stored in the\n * native format of Google S2 (24 bytes per coordinate pair).\n *\n * Default: `\"latLngDouble\"`\n */\n format?: \"latLngDouble\" | \"latLngInt\" | \"s2Point\";\n };\n};\n\n/**\n * Shared attributes of all Analyzer descriptions.\n */\nexport type GenericAnalyzerDescription = {\n /**\n * A unique name for this Analyzer.\n */\n name: string;\n /**\n * Features enabled for this Analyzer.\n */\n features: AnalyzerFeature[];\n};\n\n/**\n * An object describing an Analyzer.\n */\nexport type AnalyzerDescription =\n | IdentityAnalyzerDescription\n | DelimiterAnalyzerDescription\n | MultiDelimiterAnalyzerDescription\n | StemAnalyzerDescription\n | NormAnalyzerDescription\n | NgramAnalyzerDescription\n | TextAnalyzerDescription\n | SegmentationAnalyzerDescription\n | AqlAnalyzerDescription\n | PipelineAnalyzerDescription\n | StopwordsAnalyzerDescription\n | CollationAnalyzerDescription\n | MinHashAnalyzerDescription\n | ClassificationAnalyzerDescription\n | NearestNeighborsAnalyzerDescription\n | WildcardAnalyzerDescription\n | GeoJsonAnalyzerDescription\n | GeoPointAnalyzerDescription\n | GeoS2AnalyzerDescription;\n\n/**\n * An object describing an Identity Analyzer.\n */\nexport type IdentityAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"identity\";\n properties: Record<string, never>;\n};\n\n/**\n * An object describing a Delimiter Analyzer.\n */\nexport type DelimiterAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"delimiter\";\n properties: { delimiter: string };\n};\n\n/**\n * An object describing a Multi Delimiter Analyzer.\n */\nexport type MultiDelimiterAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"multi_delimiter\";\n properties: { delimiters: string[] };\n};\n\n/**\n * An object describing a Stem Analyzer.\n */\nexport type StemAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"stem\";\n properties: { locale: string };\n};\n\n/**\n * An object describing a Norm Analyzer.\n */\nexport type NormAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"norm\";\n properties: {\n locale: string;\n case: \"lower\" | \"none\" | \"upper\";\n accent: boolean;\n };\n};\n\n/**\n * An object describing an Ngram Analyzer.\n */\nexport type NgramAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"ngram\";\n properties: {\n max: number;\n min: number;\n preserveOriginal: boolean;\n };\n};\n\n/**\n * An object describing a Text Analyzer.\n */\nexport type TextAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"text\";\n properties: {\n locale: string;\n case: \"lower\" | \"none\" | \"upper\";\n stopwords: string[];\n stopwordsPath: string;\n accent: boolean;\n stemming: boolean;\n edgeNgram: { min: number; max: number; preserveOriginal: boolean };\n };\n};\n\n/**\n * An object describing a Segmentation Analyzer\n */\nexport type SegmentationAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"segmentation\";\n properties: {\n break: \"all\" | \"alpha\" | \"graphic\";\n case: \"lower\" | \"upper\" | \"none\";\n };\n};\n\n/**\n * An object describing an AQL Analyzer\n */\nexport type AqlAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"aql\";\n properties: {\n queryString: string;\n collapsePositions: boolean;\n keepNull: boolean;\n batchSize: number;\n memoryLimit: number;\n returnType: \"string\" | \"number\" | \"bool\";\n };\n};\n\n/**\n * An object describing a Pipeline Analyzer\n */\nexport type PipelineAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"pipeline\";\n properties: {\n pipeline: Omit<AnalyzerDescription, \"name\" | \"features\">[];\n };\n};\n\n/**\n * An object describing a Stopwords Analyzer\n */\nexport type StopwordsAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"stopwords\";\n properties: {\n stopwords: string[];\n hex: boolean;\n };\n};\n\n/**\n * An object describing a Collation Analyzer\n */\nexport type CollationAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"collation\";\n properties: {\n locale: string;\n };\n};\n\n/**\n * (Enterprise Edition only.) An object describing a MinHash Analyzer\n */\nexport type MinHashAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"minhash\";\n properties: {\n analyzer: Omit<AnalyzerDescription, \"name\" | \"features\">;\n numHashes: number;\n };\n};\n\n/**\n * (Enterprise Edition only.) An object describing a Classification Analyzer\n */\nexport type ClassificationAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"classification\";\n properties: {\n model_location: string;\n top_k: number;\n threshold: number;\n };\n};\n\n/**\n * (Enterprise Edition only.) An object describing a NearestNeighbors Analyzer\n */\nexport type NearestNeighborsAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"nearest_neighbors\";\n properties: {\n model_location: string;\n top_k: number;\n };\n};\n\n/**\n * An object describing a Wildcard Analyzer\n */\nexport type WildcardAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"wildcard\";\n properties: {\n ngramSize: number;\n analyzer?: Omit<AnalyzerDescription, \"name\" | \"features\">;\n };\n};\n\n/**\n * An object describing a GeoJSON Analyzer\n */\nexport type GeoJsonAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"geojson\";\n properties: {\n type: \"shape\" | \"centroid\" | \"point\";\n description: { maxCells: number; minLevel: number; maxLevel: number };\n };\n};\n\n/**\n * An object describing a GeoPoint Analyzer\n */\nexport type GeoPointAnalyzerDescription = GenericAnalyzerDescription & {\n type: \"geopoint\";\n properties: {\n latitude: string[];\n longitude: string[];\n description: { minCells: number; minLevel: number; maxLevel: number };\n };\n};\n\n/**\n * (Enterprise Edition only.) An object describing a GeoS2 Analyzer\n */\nexport type GeoS2AnalyzerDescription = GenericAnalyzerDescription & {\n type: \"geo_s2\";\n properties: {\n type: \"shape\" | \"centroid\" | \"point\";\n description: { maxCells: number; minLevel: number; maxLevel: number };\n format: \"latLngDouble\" | \"latLngInt\" | \"s2Point\";\n };\n};\n\n/**\n * Represents an Analyzer in a {@link database.Database}.\n */\nexport class Analyzer {\n protected _name: string;\n protected _db: Database;\n\n /**\n * @internal\n */\n constructor(db: Database, name: string) {\n this._db = db;\n this._name = name.normalize(\"NFC\");\n }\n\n /**\n * @internal\n *\n * Indicates that this object represents an ArangoDB Analyzer.\n */\n get isArangoAnalyzer(): true {\n return true;\n }\n\n /**\n * Name of this Analyzer.\n *\n * See also {@link database.Database}.\n */\n get name() {\n return this._name;\n }\n\n /**\n * Checks whether the Analyzer exists.\n *\n * @example\n * ```js\n * const db = new Database();\n * const analyzer = db.analyzer(\"some-analyzer\");\n * const result = await analyzer.exists();\n * // result indicates whether the Analyzer exists\n * ```\n */\n async exists(): Promise<boolean> {\n try {\n await this.get();\n return true;\n } catch (err: any) {\n if (isArangoError(err) && err.errorNum === ANALYZER_NOT_FOUND) {\n return false;\n }\n throw err;\n }\n }\n\n /**\n * Retrieves the Analyzer definition for the Analyzer.\n *\n * @example\n * ```js\n * const db = new Database();\n * const analyzer = db.analyzer(\"some-analyzer\");\n * const definition = await analyzer.get();\n * // definition contains the Analyzer definition\n * ```\n */\n get(): Promise<ArangoApiResponse<AnalyzerDescription>> {\n return this._db.request({\n path: `/_api/analyzer/${encodeURIComponent(this._name)}`,\n });\n }\n\n /**\n * Creates a new Analyzer with the given `options` and the instance's name.\n *\n * See also {@link database.Database#createAnalyzer}.\n *\n * @param options - Options for creating the Analyzer.\n *\n * @example\n * ```js\n * const db = new Database();\n * const analyzer = db.analyzer(\"potatoes\");\n * await analyzer.create({ type: \"identity\" });\n * // the identity Analyzer \"potatoes\" now exists\n * ```\n */\n create<Options extends CreateAnalyzerOptions>(\n options: Options\n ): Promise<\n Options extends CreateIdentityAnalyzerOptions\n ? IdentityAnalyzerDescription\n : Options extends CreateDelimiterAnalyzerOptions\n ? DelimiterAnalyzerDescription\n : Options extends CreateStemAnalyzerOptions\n ? StemAnalyzerDescription\n : Options extends CreateNormAnalyzerOptions\n ? NormAnalyzerDescription\n : Options extends CreateNgramAnalyzerOptions\n ? NgramAnalyzerDescription\n : Options extends CreateTextAnalyzerOptions\n ? TextAnalyzerDescription\n : Options extends CreateSegmentationAnalyzerOptions\n ? SegmentationAnalyzerDescription\n : Options extends CreateAqlAnalyzerOptions\n ? AqlAnalyzerDescription\n : Options extends CreatePipelineAnalyzerOptions\n ? PipelineAnalyzerDescription\n : Options extends CreateStopwordsAnalyzerOptions\n ? StopwordsAnalyzerDescription\n : Options extends CreateCollationAnalyzerOptions\n ? CollationAnalyzerDescription\n : Options extends CreateMinHashAnalyzerOptions\n ? MinHashAnalyzerDescription\n : Options extends CreateClassificationAnalyzerOptions\n ? ClassificationAnalyzerDescription\n : Options extends CreateNearestNeighborsAnalyzerOptions\n ? NearestNeighborsAnalyzerDescription\n : Options extends CreateGeoJsonAnalyzerOptions\n ? GeoJsonAnalyzerDescription\n : Options extends CreateGeoPointAnalyzerOptions\n ? GeoPointAnalyzerDescription\n : Options extends CreateGeoS2AnalyzerOptions\n ? GeoS2AnalyzerDescription\n : AnalyzerDescription\n > {\n return this._db.request({\n method: \"POST\",\n path: \"/_api/analyzer\",\n body: { name: this._name, ...options },\n });\n }\n\n /**\n * Deletes the Analyzer from the database.\n *\n * @param force - Whether the Analyzer should still be deleted even if it\n * is currently in use.\n *\n * @example\n * ```js\n * const db = new Database();\n * const analyzer = db.analyzer(\"some-analyzer\");\n * await analyzer.drop();\n * // the Analyzer \"some-analyzer\" no longer exists\n * ```\n */\n drop(force: boolean = false): Promise<ArangoApiResponse<{ name: string }>> {\n return this._db.request({\n method: \"DELETE\",\n path: `/_api/analyzer/${encodeURIComponent(this._name)}`,\n qs: { force },\n });\n }\n}\n"]}
|