arangojs 8.7.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 +30 -1
- package/analyzer.d.ts +69 -2
- package/analyzer.d.ts.map +1 -1
- package/analyzer.js.map +1 -1
- package/collection.d.ts +56 -26
- package/collection.d.ts.map +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/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,34 @@ 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
|
+
|
|
17
45
|
## [8.7.0] - 2024-02-14
|
|
18
46
|
|
|
19
47
|
### Changed
|
|
@@ -75,7 +103,7 @@ This driver uses semantic versioning:
|
|
|
75
103
|
|
|
76
104
|
- Fetching additional cursor results now uses `POST` instead of `PUT` (DE-605)
|
|
77
105
|
|
|
78
|
-
The `
|
|
106
|
+
The `PUT` route was deprecated and the `POST` route is supported in all
|
|
79
107
|
actively maintained versions of ArangoDB.
|
|
80
108
|
|
|
81
109
|
- User management methods now use database-relative URLs (DE-606)
|
|
@@ -1760,6 +1788,7 @@ For a detailed list of changes between pre-release versions of v7 see the
|
|
|
1760
1788
|
|
|
1761
1789
|
Graph methods now only return the relevant part of the response body.
|
|
1762
1790
|
|
|
1791
|
+
[8.8.0]: https://github.com/arangodb/arangojs/compare/v8.7.0...v8.8.0
|
|
1763
1792
|
[8.7.0]: https://github.com/arangodb/arangojs/compare/v8.6.0...v8.7.0
|
|
1764
1793
|
[8.6.0]: https://github.com/arangodb/arangojs/compare/v8.5.0...v8.6.0
|
|
1765
1794
|
[8.5.0]: https://github.com/arangodb/arangojs/compare/v8.4.1...v8.5.0
|
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
CHANG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,MAAM;QACV,IAAI;YACF,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,GAAQ,EAAE;YACjB,IAAI,IAAA,qBAAa,EAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,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":["../src/analyzer.ts"],"names":[],"mappings":";;;AAYA,mCAAwC;AACxC,uCAAiD;AAEjD;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,QAAa;IAC5C,OAAO,OAAO,CAAC,QAAQ,IAAI,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AACxD,CAAC;AAFD,4CAEC;AAy3BD;;GAEG;AACH,MAAa,QAAQ;IAInB;;OAEG;IACH,YAAY,EAAY,EAAE,IAAY;QACpC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACH,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,MAAM;QACV,IAAI;YACF,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;YACjB,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,GAAQ,EAAE;YACjB,IAAI,IAAA,qBAAa,EAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,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 | 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"]}
|
package/collection.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { ArangoApiResponse } from "./connection";
|
|
|
17
17
|
import { ArrayCursor } from "./cursor";
|
|
18
18
|
import { Database } from "./database";
|
|
19
19
|
import { Document, DocumentData, DocumentMetadata, DocumentSelector, Edge, EdgeData, ObjectWithKey, Patch } from "./documents";
|
|
20
|
-
import { EnsureFulltextIndexOptions, EnsureGeoIndexOptions, EnsureInvertedIndexOptions, EnsurePersistentIndexOptions, EnsureTtlIndexOptions,
|
|
20
|
+
import { EnsureFulltextIndexOptions, EnsureGeoIndexOptions, EnsureInvertedIndexOptions, EnsurePersistentIndexOptions, EnsureTtlIndexOptions, EnsureMdiIndexOptions, FulltextIndex, GeoIndex, Index, IndexSelector, InvertedIndex, PersistentIndex, TtlIndex, MdiIndex } from "./indexes";
|
|
21
21
|
import { Blob } from "./lib/blob";
|
|
22
22
|
/**
|
|
23
23
|
* Indicates whether the given value represents an {@link ArangoCollection}.
|
|
@@ -99,6 +99,32 @@ export declare type ValidationLevel = "none" | "new" | "moderate" | "strict";
|
|
|
99
99
|
* Write operation that can result in a computed value being computed.
|
|
100
100
|
*/
|
|
101
101
|
export declare type WriteOperation = "insert" | "update" | "replace";
|
|
102
|
+
/**
|
|
103
|
+
* Represents a bulk operation failure for an individual document.
|
|
104
|
+
*/
|
|
105
|
+
export declare type DocumentOperationFailure = {
|
|
106
|
+
/**
|
|
107
|
+
* Indicates that the operation failed.
|
|
108
|
+
*/
|
|
109
|
+
error: true;
|
|
110
|
+
/**
|
|
111
|
+
* Human-readable description of the failure.
|
|
112
|
+
*/
|
|
113
|
+
errorMessage: string;
|
|
114
|
+
/**
|
|
115
|
+
* Numeric representation of the failure.
|
|
116
|
+
*/
|
|
117
|
+
errorNum: number;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Metadata returned by a document operation.
|
|
121
|
+
*/
|
|
122
|
+
export declare type DocumentOperationMetadata = DocumentMetadata & {
|
|
123
|
+
/**
|
|
124
|
+
* Revision of the document that was updated or replaced by this operation.
|
|
125
|
+
*/
|
|
126
|
+
_oldRev?: string;
|
|
127
|
+
};
|
|
102
128
|
/**
|
|
103
129
|
* Properties defining a computed value.
|
|
104
130
|
*/
|
|
@@ -1724,8 +1750,9 @@ export interface DocumentCollection<T extends Record<string, any> = any> extends
|
|
|
1724
1750
|
* console.log(result.new.color, result.new.count); // "blue" 1
|
|
1725
1751
|
* ```
|
|
1726
1752
|
*/
|
|
1727
|
-
save(data: DocumentData<T>, options?: CollectionInsertOptions): Promise<
|
|
1753
|
+
save(data: DocumentData<T>, options?: CollectionInsertOptions): Promise<DocumentOperationMetadata & {
|
|
1728
1754
|
new?: Document<T>;
|
|
1755
|
+
old?: Document<T>;
|
|
1729
1756
|
}>;
|
|
1730
1757
|
/**
|
|
1731
1758
|
* Inserts new documents with the given `data` into the collection.
|
|
@@ -1748,9 +1775,10 @@ export interface DocumentCollection<T extends Record<string, any> = any> extends
|
|
|
1748
1775
|
* console.log(result[1].new.color, result[1].new.count); // "red" 2
|
|
1749
1776
|
* ```
|
|
1750
1777
|
*/
|
|
1751
|
-
saveAll(data: Array<DocumentData<T>>, options?: CollectionInsertOptions): Promise<Array<
|
|
1778
|
+
saveAll(data: Array<DocumentData<T>>, options?: CollectionInsertOptions): Promise<Array<(DocumentOperationMetadata & {
|
|
1752
1779
|
new?: Document<T>;
|
|
1753
|
-
|
|
1780
|
+
old?: Document<T>;
|
|
1781
|
+
}) | DocumentOperationFailure>>;
|
|
1754
1782
|
/**
|
|
1755
1783
|
* Replaces an existing document in the collection.
|
|
1756
1784
|
*
|
|
@@ -1775,7 +1803,7 @@ export interface DocumentCollection<T extends Record<string, any> = any> extends
|
|
|
1775
1803
|
* console.log(result.new.color, result.new.count); // "red" undefined
|
|
1776
1804
|
* ```
|
|
1777
1805
|
*/
|
|
1778
|
-
replace(selector: DocumentSelector, newData: DocumentData<T>, options?: CollectionReplaceOptions): Promise<
|
|
1806
|
+
replace(selector: DocumentSelector, newData: DocumentData<T>, options?: CollectionReplaceOptions): Promise<DocumentOperationMetadata & {
|
|
1779
1807
|
new?: Document<T>;
|
|
1780
1808
|
old?: Document<T>;
|
|
1781
1809
|
}>;
|
|
@@ -1807,10 +1835,10 @@ export interface DocumentCollection<T extends Record<string, any> = any> extends
|
|
|
1807
1835
|
_key: string;
|
|
1808
1836
|
} | {
|
|
1809
1837
|
_id: string;
|
|
1810
|
-
})>, options?: Omit<CollectionReplaceOptions, "ifMatch">): Promise<Array<
|
|
1838
|
+
})>, options?: Omit<CollectionReplaceOptions, "ifMatch">): Promise<Array<(DocumentOperationMetadata & {
|
|
1811
1839
|
new?: Document<T>;
|
|
1812
1840
|
old?: Document<T>;
|
|
1813
|
-
}>>;
|
|
1841
|
+
}) | DocumentOperationFailure>>;
|
|
1814
1842
|
/**
|
|
1815
1843
|
* Updates an existing document in the collection.
|
|
1816
1844
|
*
|
|
@@ -1835,7 +1863,7 @@ export interface DocumentCollection<T extends Record<string, any> = any> extends
|
|
|
1835
1863
|
* console.log(result.new.color, result.new.count); // "blue" 2
|
|
1836
1864
|
* ```
|
|
1837
1865
|
*/
|
|
1838
|
-
update(selector: DocumentSelector, newData: Patch<DocumentData<T>>, options?: CollectionUpdateOptions): Promise<
|
|
1866
|
+
update(selector: DocumentSelector, newData: Patch<DocumentData<T>>, options?: CollectionUpdateOptions): Promise<DocumentOperationMetadata & {
|
|
1839
1867
|
new?: Document<T>;
|
|
1840
1868
|
old?: Document<T>;
|
|
1841
1869
|
}>;
|
|
@@ -1867,10 +1895,10 @@ export interface DocumentCollection<T extends Record<string, any> = any> extends
|
|
|
1867
1895
|
_key: string;
|
|
1868
1896
|
} | {
|
|
1869
1897
|
_id: string;
|
|
1870
|
-
})>, options?: Omit<CollectionUpdateOptions, "ifMatch">): Promise<Array<
|
|
1898
|
+
})>, options?: Omit<CollectionUpdateOptions, "ifMatch">): Promise<Array<(DocumentOperationMetadata & {
|
|
1871
1899
|
new?: Document<T>;
|
|
1872
1900
|
old?: Document<T>;
|
|
1873
|
-
}>>;
|
|
1901
|
+
}) | DocumentOperationFailure>>;
|
|
1874
1902
|
/**
|
|
1875
1903
|
* Removes an existing document from the collection.
|
|
1876
1904
|
*
|
|
@@ -1919,9 +1947,9 @@ export interface DocumentCollection<T extends Record<string, any> = any> extends
|
|
|
1919
1947
|
* // document with keys "abc123" and "def456" deleted
|
|
1920
1948
|
* ```
|
|
1921
1949
|
*/
|
|
1922
|
-
removeAll(selectors: (string | ObjectWithKey)[], options?: Omit<CollectionRemoveOptions, "ifMatch">): Promise<Array<DocumentMetadata & {
|
|
1950
|
+
removeAll(selectors: (string | ObjectWithKey)[], options?: Omit<CollectionRemoveOptions, "ifMatch">): Promise<Array<(DocumentMetadata & {
|
|
1923
1951
|
old?: Document<T>;
|
|
1924
|
-
}>>;
|
|
1952
|
+
}) | DocumentOperationFailure>>;
|
|
1925
1953
|
/**
|
|
1926
1954
|
* Bulk imports the given `data` into the collection.
|
|
1927
1955
|
*
|
|
@@ -2402,14 +2430,14 @@ export interface DocumentCollection<T extends Record<string, any> = any> extends
|
|
|
2402
2430
|
* const collection = db.collection("some-points");
|
|
2403
2431
|
* // Create a multi-dimensional index for the attributes x, y and z
|
|
2404
2432
|
* await collection.ensureIndex({
|
|
2405
|
-
* type: "
|
|
2433
|
+
* type: "mdi",
|
|
2406
2434
|
* fields: ["x", "y", "z"],
|
|
2407
2435
|
* fieldValueTypes: "double"
|
|
2408
2436
|
* });
|
|
2409
2437
|
* ```
|
|
2410
2438
|
* ```
|
|
2411
2439
|
*/
|
|
2412
|
-
ensureIndex(details:
|
|
2440
|
+
ensureIndex(details: EnsureMdiIndexOptions): Promise<ArangoApiResponse<MdiIndex & {
|
|
2413
2441
|
isNewlyCreated: boolean;
|
|
2414
2442
|
}>>;
|
|
2415
2443
|
/**
|
|
@@ -2638,8 +2666,9 @@ export interface EdgeCollection<T extends Record<string, any> = any> extends Doc
|
|
|
2638
2666
|
* );
|
|
2639
2667
|
* ```
|
|
2640
2668
|
*/
|
|
2641
|
-
save(data: EdgeData<T>, options?: CollectionInsertOptions): Promise<
|
|
2669
|
+
save(data: EdgeData<T>, options?: CollectionInsertOptions): Promise<DocumentOperationMetadata & {
|
|
2642
2670
|
new?: Edge<T>;
|
|
2671
|
+
old?: Edge<T>;
|
|
2643
2672
|
}>;
|
|
2644
2673
|
/**
|
|
2645
2674
|
* Inserts new documents with the given `data` into the collection.
|
|
@@ -2660,9 +2689,10 @@ export interface EdgeCollection<T extends Record<string, any> = any> extends Doc
|
|
|
2660
2689
|
* );
|
|
2661
2690
|
* ```
|
|
2662
2691
|
*/
|
|
2663
|
-
saveAll(data: Array<EdgeData<T>>, options?: CollectionInsertOptions): Promise<Array<
|
|
2692
|
+
saveAll(data: Array<EdgeData<T>>, options?: CollectionInsertOptions): Promise<Array<(DocumentOperationMetadata & {
|
|
2664
2693
|
new?: Edge<T>;
|
|
2665
|
-
|
|
2694
|
+
old?: Edge<T>;
|
|
2695
|
+
}) | DocumentOperationFailure>>;
|
|
2666
2696
|
/**
|
|
2667
2697
|
* Replaces an existing document in the collection.
|
|
2668
2698
|
*
|
|
@@ -2695,7 +2725,7 @@ export interface EdgeCollection<T extends Record<string, any> = any> extends Doc
|
|
|
2695
2725
|
* console.log(result.new.active, result.new.best); // false undefined
|
|
2696
2726
|
* ```
|
|
2697
2727
|
*/
|
|
2698
|
-
replace(selector: DocumentSelector, newData: DocumentData<T>, options?: CollectionReplaceOptions): Promise<
|
|
2728
|
+
replace(selector: DocumentSelector, newData: DocumentData<T>, options?: CollectionReplaceOptions): Promise<DocumentOperationMetadata & {
|
|
2699
2729
|
new?: Edge<T>;
|
|
2700
2730
|
old?: Edge<T>;
|
|
2701
2731
|
}>;
|
|
@@ -2743,10 +2773,10 @@ export interface EdgeCollection<T extends Record<string, any> = any> extends Doc
|
|
|
2743
2773
|
_key: string;
|
|
2744
2774
|
} | {
|
|
2745
2775
|
_id: string;
|
|
2746
|
-
})>, options?: CollectionReplaceOptions): Promise<Array<
|
|
2776
|
+
})>, options?: CollectionReplaceOptions): Promise<Array<(DocumentOperationMetadata & {
|
|
2747
2777
|
new?: Edge<T>;
|
|
2748
2778
|
old?: Edge<T>;
|
|
2749
|
-
}>>;
|
|
2779
|
+
}) | DocumentOperationFailure>>;
|
|
2750
2780
|
/**
|
|
2751
2781
|
* Updates an existing document in the collection.
|
|
2752
2782
|
*
|
|
@@ -2779,7 +2809,7 @@ export interface EdgeCollection<T extends Record<string, any> = any> extends Doc
|
|
|
2779
2809
|
* console.log(result.new.active, result.new.best); // false true
|
|
2780
2810
|
* ```
|
|
2781
2811
|
*/
|
|
2782
|
-
update(selector: DocumentSelector, newData: Patch<DocumentData<T>>, options?: CollectionUpdateOptions): Promise<
|
|
2812
|
+
update(selector: DocumentSelector, newData: Patch<DocumentData<T>>, options?: CollectionUpdateOptions): Promise<DocumentOperationMetadata & {
|
|
2783
2813
|
new?: Edge<T>;
|
|
2784
2814
|
old?: Edge<T>;
|
|
2785
2815
|
}>;
|
|
@@ -2825,10 +2855,10 @@ export interface EdgeCollection<T extends Record<string, any> = any> extends Doc
|
|
|
2825
2855
|
_key: string;
|
|
2826
2856
|
} | {
|
|
2827
2857
|
_id: string;
|
|
2828
|
-
})>, options?: CollectionUpdateOptions): Promise<Array<
|
|
2858
|
+
})>, options?: CollectionUpdateOptions): Promise<Array<(DocumentOperationMetadata & {
|
|
2829
2859
|
new?: Edge<T>;
|
|
2830
2860
|
old?: Edge<T>;
|
|
2831
|
-
}>>;
|
|
2861
|
+
}) | DocumentOperationFailure>>;
|
|
2832
2862
|
/**
|
|
2833
2863
|
* Removes an existing document from the collection.
|
|
2834
2864
|
*
|
|
@@ -2869,9 +2899,9 @@ export interface EdgeCollection<T extends Record<string, any> = any> extends Doc
|
|
|
2869
2899
|
* // document with keys "musadir" and "salman" deleted
|
|
2870
2900
|
* ```
|
|
2871
2901
|
*/
|
|
2872
|
-
removeAll(selectors: DocumentSelector[], options?: CollectionRemoveOptions): Promise<Array<DocumentMetadata & {
|
|
2902
|
+
removeAll(selectors: DocumentSelector[], options?: CollectionRemoveOptions): Promise<Array<(DocumentMetadata & {
|
|
2873
2903
|
old?: Edge<T>;
|
|
2874
|
-
}>>;
|
|
2904
|
+
}) | DocumentOperationFailure>>;
|
|
2875
2905
|
/**
|
|
2876
2906
|
* Bulk imports the given `data` into the collection.
|
|
2877
2907
|
*
|
|
@@ -3293,7 +3323,7 @@ export declare class Collection<T extends Record<string, any> = any> implements
|
|
|
3293
3323
|
removeByKeys(keys: string[], options?: SimpleQueryRemoveByKeysOptions): Promise<any>;
|
|
3294
3324
|
indexes(): Promise<any>;
|
|
3295
3325
|
index(selector: IndexSelector): Promise<any>;
|
|
3296
|
-
ensureIndex(options: EnsurePersistentIndexOptions | EnsureGeoIndexOptions | EnsureFulltextIndexOptions | EnsureTtlIndexOptions |
|
|
3326
|
+
ensureIndex(options: EnsurePersistentIndexOptions | EnsureGeoIndexOptions | EnsureFulltextIndexOptions | EnsureTtlIndexOptions | EnsureMdiIndexOptions | EnsureInvertedIndexOptions): Promise<any>;
|
|
3297
3327
|
dropIndex(selector: IndexSelector): Promise<any>;
|
|
3298
3328
|
fulltext(attribute: string, query: string, { index, ...options }?: SimpleQueryFulltextOptions): Promise<ArrayCursor<any>>;
|
|
3299
3329
|
compact(): Promise<any>;
|