@ibm-cloud/cloudant 0.12.12 → 0.12.14
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/README.md +14 -14
- package/cloudant/v1.d.ts +27 -18
- package/cloudant/v1.js +59 -20
- package/cloudant/v1.js.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
[](https://github.com/IBM/cloudant-node-sdk/releases/latest)
|
|
3
3
|
[](https://ibm.github.io/cloudant-node-sdk/)
|
|
4
4
|
|
|
5
|
-
# IBM Cloudant Node.js SDK Version 0.12.
|
|
5
|
+
# IBM Cloudant Node.js SDK Version 0.12.14
|
|
6
6
|
|
|
7
7
|
IBM Cloudant Node.js SDK is a client library that interacts with the
|
|
8
8
|
[IBM Cloudant APIs](https://cloud.ibm.com/apidocs/cloudant?code=node).
|
|
@@ -68,8 +68,8 @@ project:
|
|
|
68
68
|
- Handles the authentication.
|
|
69
69
|
- Familiar user experience with IBM Cloud SDKs.
|
|
70
70
|
- Flexibility to use either built-in models or byte-based requests and responses for documents.
|
|
71
|
-
- Built-in [Changes feed follower](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
72
|
-
- Built-in [Pagination](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
71
|
+
- Built-in [Changes feed follower](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/docs/Changes_Follower.md)
|
|
72
|
+
- Built-in [Pagination](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/docs/Pagination.md) (beta)
|
|
73
73
|
- `Promise` based design with asynchronous HTTP requests.
|
|
74
74
|
- Use either as native JavaScript or take advantage of TypeScript models.
|
|
75
75
|
- Transparently compresses request and response bodies.
|
|
@@ -99,16 +99,16 @@ account.
|
|
|
99
99
|
|
|
100
100
|
There are several ways to **set** these authentication properties:
|
|
101
101
|
|
|
102
|
-
1. As [environment variables](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
103
|
-
2. The [programmatic approach](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
104
|
-
3. With an [external credentials file](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
102
|
+
1. As [environment variables](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/docs/Authentication.md#authentication-with-environment-variables)
|
|
103
|
+
2. The [programmatic approach](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/docs/Authentication.md#programmatic-authentication)
|
|
104
|
+
3. With an [external credentials file](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/docs/Authentication.md#authentication-with-external-configuration)
|
|
105
105
|
|
|
106
106
|
The following section describes the different authentication types and provides environment variable examples.
|
|
107
107
|
Examples for other configuration methods are available by following the provided links.
|
|
108
108
|
|
|
109
109
|
### Authentication
|
|
110
110
|
|
|
111
|
-
Consult the [authentication document](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
111
|
+
Consult the [authentication document](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/docs/Authentication.md)
|
|
112
112
|
for comprehensive details of all the available authentication methods and how to configure them with environment settings
|
|
113
113
|
or programmatically.
|
|
114
114
|
|
|
@@ -154,10 +154,10 @@ service.getAllDbs().then(response => {
|
|
|
154
154
|
});
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
[More tutorial examples](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
157
|
+
[More tutorial examples](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/docs/Examples.md) for creating a database
|
|
158
158
|
and document create, read, update and delete operations.
|
|
159
159
|
|
|
160
|
-
For a complete list of code examples, see the [examples directory](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
160
|
+
For a complete list of code examples, see the [examples directory](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/examples#examples-for-node).
|
|
161
161
|
|
|
162
162
|
### Error handling
|
|
163
163
|
|
|
@@ -181,7 +181,7 @@ Response byte stream is supported in functions with the suffix of `AsStream`.
|
|
|
181
181
|
The returned byte stream allows the response body to be consumed
|
|
182
182
|
without triggering JSON unmarshalling that is typically performed by the SDK.
|
|
183
183
|
|
|
184
|
-
The [update document](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
184
|
+
The [update document](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/docs/Examples.md#3-update-your-previously-created-document) section
|
|
185
185
|
contains examples for both request and response byte stream cases.
|
|
186
186
|
|
|
187
187
|
The API reference contains further examples of using byte streams.
|
|
@@ -197,7 +197,7 @@ Expand them to see examples of:
|
|
|
197
197
|
|
|
198
198
|
### Further resources
|
|
199
199
|
|
|
200
|
-
- [Cloudant Node.js SDK feature docs](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
200
|
+
- [Cloudant Node.js SDK feature docs](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/docs)
|
|
201
201
|
- [Cloudant API docs](https://cloud.ibm.com/apidocs/cloudant?code=node):
|
|
202
202
|
API reference including usage examples for Cloudant Node.js SDK API.
|
|
203
203
|
- [TypeDoc](https://ibm.github.io/cloudant-node-sdk/):
|
|
@@ -282,7 +282,7 @@ If you encounter an issue with the project, you are welcome to submit a
|
|
|
282
282
|
|
|
283
283
|
Before you submit a bug report, search for
|
|
284
284
|
[similar issues](https://github.com/IBM/cloudant-node-sdk/issues?q=is%3Aissue) and review the
|
|
285
|
-
[KNOWN_ISSUES file](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
285
|
+
[KNOWN_ISSUES file](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/KNOWN_ISSUES.md) to verify that your issue hasn't been reported yet.
|
|
286
286
|
|
|
287
287
|
Please consult the [security policy](https://github.com/IBM/cloudant-node-sdk/security/policy) before opening security related issues.
|
|
288
288
|
|
|
@@ -312,8 +312,8 @@ Find more open source projects on the [IBM GitHub](http://ibm.github.io/) page.
|
|
|
312
312
|
|
|
313
313
|
## Contributing
|
|
314
314
|
|
|
315
|
-
For more information, see [CONTRIBUTING](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
315
|
+
For more information, see [CONTRIBUTING](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/CONTRIBUTING.md).
|
|
316
316
|
|
|
317
317
|
## License
|
|
318
318
|
|
|
319
|
-
This SDK is released under the Apache 2.0 license. To read the full text of the license, see [LICENSE](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.
|
|
319
|
+
This SDK is released under the Apache 2.0 license. To read the full text of the license, see [LICENSE](https://github.com/IBM/cloudant-node-sdk/tree/v0.12.14/LICENSE).
|
package/cloudant/v1.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* (C) Copyright IBM Corp.
|
|
2
|
+
* (C) Copyright IBM Corp. 2026.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -2149,8 +2149,8 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
2149
2149
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
2150
2150
|
* @param {IndexDefinition} params.index - Schema for a `json` or `text` query index definition. Indexes of type
|
|
2151
2151
|
* `text` have additional configuration properties that do not apply to `json` indexes, these are:
|
|
2152
|
-
* * `default_analyzer` - the default text analyzer to use
|
|
2153
|
-
* document fields and what analyzer to use for that purpose.
|
|
2152
|
+
* * `default_analyzer` - the default text analyzer to use
|
|
2153
|
+
* * `default_field` - whether to index the text in all document fields and what analyzer to use for that purpose.
|
|
2154
2154
|
* @param {string} [params.ddoc] - Specifies the design document name in which the index will be created. The design
|
|
2155
2155
|
* document name is the design document ID excluding the `_design/` prefix.
|
|
2156
2156
|
* @param {string} [params.name] - name.
|
|
@@ -5314,8 +5314,8 @@ declare namespace CloudantV1 {
|
|
|
5314
5314
|
db: string;
|
|
5315
5315
|
/** Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration
|
|
5316
5316
|
* properties that do not apply to `json` indexes, these are:
|
|
5317
|
-
* * `default_analyzer` - the default text analyzer to use
|
|
5318
|
-
* document fields and what analyzer to use for that purpose.
|
|
5317
|
+
* * `default_analyzer` - the default text analyzer to use
|
|
5318
|
+
* * `default_field` - whether to index the text in all document fields and what analyzer to use for that purpose.
|
|
5319
5319
|
*/
|
|
5320
5320
|
index: IndexDefinition;
|
|
5321
5321
|
/** Specifies the design document name in which the index will be created. The design document name is the
|
|
@@ -6357,8 +6357,9 @@ declare namespace CloudantV1 {
|
|
|
6357
6357
|
export class Analyzer {
|
|
6358
6358
|
/** Schema for the name of the Apache Lucene analyzer to use for text indexing. The default value varies
|
|
6359
6359
|
* depending on the analyzer usage:
|
|
6360
|
-
* * For search indexes the default is `standard`
|
|
6361
|
-
* text
|
|
6360
|
+
* * For search indexes the default is `standard`
|
|
6361
|
+
* * For query text indexes the default is `keyword`
|
|
6362
|
+
* * For a query text index default_field the default is `standard`.
|
|
6362
6363
|
*/
|
|
6363
6364
|
name: Analyzer.Constants.Name | string;
|
|
6364
6365
|
/** Custom stopwords to use with the named analyzer. */
|
|
@@ -6420,17 +6421,21 @@ declare namespace CloudantV1 {
|
|
|
6420
6421
|
}
|
|
6421
6422
|
}
|
|
6422
6423
|
/**
|
|
6423
|
-
*
|
|
6424
|
+
* Analyzer configuration for search indexes. The default and fields properties are only applicable for the `perfield`
|
|
6425
|
+
* analyzer name.
|
|
6424
6426
|
*/
|
|
6425
6427
|
export class AnalyzerConfiguration {
|
|
6426
6428
|
/** Schema for the name of the Apache Lucene analyzer to use for text indexing. The default value varies
|
|
6427
6429
|
* depending on the analyzer usage:
|
|
6428
|
-
* * For search indexes the default is `standard`
|
|
6429
|
-
* text
|
|
6430
|
+
* * For search indexes the default is `standard`
|
|
6431
|
+
* * For query text indexes the default is `keyword`
|
|
6432
|
+
* * For a query text index default_field the default is `standard`.
|
|
6430
6433
|
*/
|
|
6431
6434
|
name: AnalyzerConfiguration.Constants.Name | string;
|
|
6432
6435
|
/** Custom stopwords to use with the named analyzer. */
|
|
6433
6436
|
stopwords?: string[];
|
|
6437
|
+
/** Schema for a full text search analyzer. */
|
|
6438
|
+
default?: Analyzer;
|
|
6434
6439
|
/** Schema for mapping a field name to a per field analyzer. */
|
|
6435
6440
|
fields?: {
|
|
6436
6441
|
[key: string]: Analyzer;
|
|
@@ -6489,6 +6494,7 @@ declare namespace CloudantV1 {
|
|
|
6489
6494
|
interface Transport {
|
|
6490
6495
|
name: string;
|
|
6491
6496
|
stopwords?: string[];
|
|
6497
|
+
default?: Analyzer.Transport;
|
|
6492
6498
|
fields?: {
|
|
6493
6499
|
[key: string]: Analyzer.Transport;
|
|
6494
6500
|
};
|
|
@@ -7824,8 +7830,8 @@ declare namespace CloudantV1 {
|
|
|
7824
7830
|
/**
|
|
7825
7831
|
* Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration
|
|
7826
7832
|
* properties that do not apply to `json` indexes, these are:
|
|
7827
|
-
* * `default_analyzer` - the default text analyzer to use
|
|
7828
|
-
* document fields and what analyzer to use for that purpose.
|
|
7833
|
+
* * `default_analyzer` - the default text analyzer to use
|
|
7834
|
+
* * `default_field` - whether to index the text in all document fields and what analyzer to use for that purpose.
|
|
7829
7835
|
*/
|
|
7830
7836
|
export class IndexDefinition {
|
|
7831
7837
|
/** Schema for a full text search analyzer. */
|
|
@@ -7844,9 +7850,10 @@ declare namespace CloudantV1 {
|
|
|
7844
7850
|
fields: IndexField[];
|
|
7845
7851
|
/** Whether to scan every document for arrays and store the length for each array found. Set the
|
|
7846
7852
|
* index_array_lengths field to false if:
|
|
7847
|
-
* * You do not need to know the length of an array.
|
|
7848
|
-
*
|
|
7849
|
-
*
|
|
7853
|
+
* * You do not need to know the length of an array.
|
|
7854
|
+
* * You do not use the `$size` operator.
|
|
7855
|
+
* * The documents in your database are complex, or not completely under your control. As a result, it is difficult
|
|
7856
|
+
* to estimate the impact of the extra processing that is needed to determine and store the arrays lengths.
|
|
7850
7857
|
*/
|
|
7851
7858
|
indexArrayLengths?: boolean;
|
|
7852
7859
|
/** JSON object describing criteria used to select documents. The selector specifies fields in the document, and
|
|
@@ -7938,8 +7945,8 @@ declare namespace CloudantV1 {
|
|
|
7938
7945
|
ddoc: string | null;
|
|
7939
7946
|
/** Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration
|
|
7940
7947
|
* properties that do not apply to `json` indexes, these are:
|
|
7941
|
-
* * `default_analyzer` - the default text analyzer to use
|
|
7942
|
-
* document fields and what analyzer to use for that purpose.
|
|
7948
|
+
* * `default_analyzer` - the default text analyzer to use
|
|
7949
|
+
* * `default_field` - whether to index the text in all document fields and what analyzer to use for that purpose.
|
|
7943
7950
|
*/
|
|
7944
7951
|
def: IndexDefinition;
|
|
7945
7952
|
/** Index name. */
|
|
@@ -8744,7 +8751,9 @@ declare namespace CloudantV1 {
|
|
|
8744
8751
|
* Schema for a search index definition.
|
|
8745
8752
|
*/
|
|
8746
8753
|
export class SearchIndexDefinition {
|
|
8747
|
-
/**
|
|
8754
|
+
/** Analyzer configuration for search indexes. The default and fields properties are only applicable for the
|
|
8755
|
+
* `perfield` analyzer name.
|
|
8756
|
+
*/
|
|
8748
8757
|
analyzer?: AnalyzerConfiguration;
|
|
8749
8758
|
/** String form of a JavaScript function that is called for each document in the database. The function takes
|
|
8750
8759
|
* the document as a parameter, extracts some data from it, and then calls the `index` function to index that data.
|
package/cloudant/v1.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* (C) Copyright IBM Corp.
|
|
3
|
+
* (C) Copyright IBM Corp. 2026.
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -18,6 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
19
|
};
|
|
20
20
|
const extend_1 = __importDefault(require("extend"));
|
|
21
|
+
const node_stream_1 = require("node:stream");
|
|
21
22
|
const ibm_cloud_sdk_core_1 = require("ibm-cloud-sdk-core");
|
|
22
23
|
const common_1 = require("../lib/common");
|
|
23
24
|
const cloudantBaseService_1 = require("../lib/cloudantBaseService");
|
|
@@ -1037,7 +1038,13 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
1037
1038
|
if (_validationErrors) {
|
|
1038
1039
|
return Promise.reject(_validationErrors);
|
|
1039
1040
|
}
|
|
1040
|
-
|
|
1041
|
+
let body;
|
|
1042
|
+
if (_params.document instanceof node_stream_1.Readable || _params.document instanceof Buffer) {
|
|
1043
|
+
body = _params.document;
|
|
1044
|
+
}
|
|
1045
|
+
else {
|
|
1046
|
+
body = CloudantV1.Document.serialize(_params.document);
|
|
1047
|
+
}
|
|
1041
1048
|
const query = {
|
|
1042
1049
|
'batch': _params.batch,
|
|
1043
1050
|
};
|
|
@@ -1344,7 +1351,13 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
1344
1351
|
if (_validationErrors) {
|
|
1345
1352
|
return Promise.reject(_validationErrors);
|
|
1346
1353
|
}
|
|
1347
|
-
|
|
1354
|
+
let body;
|
|
1355
|
+
if (_params.bulkDocs instanceof node_stream_1.Readable || _params.bulkDocs instanceof Buffer) {
|
|
1356
|
+
body = _params.bulkDocs;
|
|
1357
|
+
}
|
|
1358
|
+
else {
|
|
1359
|
+
body = CloudantV1.BulkDocs.serialize(_params.bulkDocs);
|
|
1360
|
+
}
|
|
1348
1361
|
const path = {
|
|
1349
1362
|
'db': _params.db,
|
|
1350
1363
|
};
|
|
@@ -2026,7 +2039,13 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
2026
2039
|
if (_validationErrors) {
|
|
2027
2040
|
return Promise.reject(_validationErrors);
|
|
2028
2041
|
}
|
|
2029
|
-
|
|
2042
|
+
let body;
|
|
2043
|
+
if (_params.document instanceof node_stream_1.Readable || _params.document instanceof Buffer) {
|
|
2044
|
+
body = _params.document;
|
|
2045
|
+
}
|
|
2046
|
+
else {
|
|
2047
|
+
body = CloudantV1.Document.serialize(_params.document);
|
|
2048
|
+
}
|
|
2030
2049
|
const query = {
|
|
2031
2050
|
'batch': _params.batch,
|
|
2032
2051
|
'new_edits': _params.newEdits,
|
|
@@ -4333,8 +4352,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
4333
4352
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
4334
4353
|
* @param {IndexDefinition} params.index - Schema for a `json` or `text` query index definition. Indexes of type
|
|
4335
4354
|
* `text` have additional configuration properties that do not apply to `json` indexes, these are:
|
|
4336
|
-
* * `default_analyzer` - the default text analyzer to use
|
|
4337
|
-
* document fields and what analyzer to use for that purpose.
|
|
4355
|
+
* * `default_analyzer` - the default text analyzer to use
|
|
4356
|
+
* * `default_field` - whether to index the text in all document fields and what analyzer to use for that purpose.
|
|
4338
4357
|
* @param {string} [params.ddoc] - Specifies the design document name in which the index will be created. The design
|
|
4339
4358
|
* document name is the design document ID excluding the `_design/` prefix.
|
|
4340
4359
|
* @param {string} [params.name] - name.
|
|
@@ -6047,7 +6066,13 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
6047
6066
|
if (_validationErrors) {
|
|
6048
6067
|
return Promise.reject(_validationErrors);
|
|
6049
6068
|
}
|
|
6050
|
-
|
|
6069
|
+
let body;
|
|
6070
|
+
if (_params.document instanceof node_stream_1.Readable || _params.document instanceof Buffer) {
|
|
6071
|
+
body = _params.document;
|
|
6072
|
+
}
|
|
6073
|
+
else {
|
|
6074
|
+
body = CloudantV1.Document.serialize(_params.document);
|
|
6075
|
+
}
|
|
6051
6076
|
const query = {
|
|
6052
6077
|
'batch': _params.batch,
|
|
6053
6078
|
};
|
|
@@ -7638,8 +7663,9 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
7638
7663
|
class Analyzer {
|
|
7639
7664
|
/** Schema for the name of the Apache Lucene analyzer to use for text indexing. The default value varies
|
|
7640
7665
|
* depending on the analyzer usage:
|
|
7641
|
-
* * For search indexes the default is `standard`
|
|
7642
|
-
* text
|
|
7666
|
+
* * For search indexes the default is `standard`
|
|
7667
|
+
* * For query text indexes the default is `keyword`
|
|
7668
|
+
* * For a query text index default_field the default is `standard`.
|
|
7643
7669
|
*/
|
|
7644
7670
|
name;
|
|
7645
7671
|
/** Custom stopwords to use with the named analyzer. */
|
|
@@ -7724,17 +7750,21 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
7724
7750
|
})(Constants = Analyzer.Constants || (Analyzer.Constants = {}));
|
|
7725
7751
|
})(Analyzer = CloudantV1.Analyzer || (CloudantV1.Analyzer = {}));
|
|
7726
7752
|
/**
|
|
7727
|
-
*
|
|
7753
|
+
* Analyzer configuration for search indexes. The default and fields properties are only applicable for the `perfield`
|
|
7754
|
+
* analyzer name.
|
|
7728
7755
|
*/
|
|
7729
7756
|
class AnalyzerConfiguration {
|
|
7730
7757
|
/** Schema for the name of the Apache Lucene analyzer to use for text indexing. The default value varies
|
|
7731
7758
|
* depending on the analyzer usage:
|
|
7732
|
-
* * For search indexes the default is `standard`
|
|
7733
|
-
* text
|
|
7759
|
+
* * For search indexes the default is `standard`
|
|
7760
|
+
* * For query text indexes the default is `keyword`
|
|
7761
|
+
* * For a query text index default_field the default is `standard`.
|
|
7734
7762
|
*/
|
|
7735
7763
|
name;
|
|
7736
7764
|
/** Custom stopwords to use with the named analyzer. */
|
|
7737
7765
|
stopwords;
|
|
7766
|
+
/** Schema for a full text search analyzer. */
|
|
7767
|
+
default;
|
|
7738
7768
|
/** Schema for mapping a field name to a per field analyzer. */
|
|
7739
7769
|
fields;
|
|
7740
7770
|
static serialize(obj) {
|
|
@@ -7748,6 +7778,9 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
7748
7778
|
if (obj.stopwords !== undefined) {
|
|
7749
7779
|
copy.stopwords = obj.stopwords;
|
|
7750
7780
|
}
|
|
7781
|
+
if (obj.default !== undefined) {
|
|
7782
|
+
copy.default = Analyzer.serialize(obj.default);
|
|
7783
|
+
}
|
|
7751
7784
|
if (obj.fields !== undefined) {
|
|
7752
7785
|
copy.fields = ibm_cloud_sdk_core_1.BaseService.convertModel(obj.fields, Analyzer.serialize, true);
|
|
7753
7786
|
}
|
|
@@ -7764,6 +7797,9 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
7764
7797
|
if (obj.stopwords !== undefined) {
|
|
7765
7798
|
copy.stopwords = obj.stopwords;
|
|
7766
7799
|
}
|
|
7800
|
+
if (obj.default !== undefined) {
|
|
7801
|
+
copy.default = Analyzer.deserialize(obj.default);
|
|
7802
|
+
}
|
|
7767
7803
|
if (obj.fields !== undefined) {
|
|
7768
7804
|
copy.fields = ibm_cloud_sdk_core_1.BaseService.convertModel(obj.fields, Analyzer.deserialize, true);
|
|
7769
7805
|
}
|
|
@@ -10573,8 +10609,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
10573
10609
|
/**
|
|
10574
10610
|
* Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration
|
|
10575
10611
|
* properties that do not apply to `json` indexes, these are:
|
|
10576
|
-
* * `default_analyzer` - the default text analyzer to use
|
|
10577
|
-
* document fields and what analyzer to use for that purpose.
|
|
10612
|
+
* * `default_analyzer` - the default text analyzer to use
|
|
10613
|
+
* * `default_field` - whether to index the text in all document fields and what analyzer to use for that purpose.
|
|
10578
10614
|
*/
|
|
10579
10615
|
class IndexDefinition {
|
|
10580
10616
|
/** Schema for a full text search analyzer. */
|
|
@@ -10593,9 +10629,10 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
10593
10629
|
fields;
|
|
10594
10630
|
/** Whether to scan every document for arrays and store the length for each array found. Set the
|
|
10595
10631
|
* index_array_lengths field to false if:
|
|
10596
|
-
* * You do not need to know the length of an array.
|
|
10597
|
-
*
|
|
10598
|
-
*
|
|
10632
|
+
* * You do not need to know the length of an array.
|
|
10633
|
+
* * You do not use the `$size` operator.
|
|
10634
|
+
* * The documents in your database are complex, or not completely under your control. As a result, it is difficult
|
|
10635
|
+
* to estimate the impact of the extra processing that is needed to determine and store the arrays lengths.
|
|
10599
10636
|
*/
|
|
10600
10637
|
indexArrayLengths;
|
|
10601
10638
|
/** JSON object describing criteria used to select documents. The selector specifies fields in the document, and
|
|
@@ -10756,8 +10793,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
10756
10793
|
ddoc;
|
|
10757
10794
|
/** Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration
|
|
10758
10795
|
* properties that do not apply to `json` indexes, these are:
|
|
10759
|
-
* * `default_analyzer` - the default text analyzer to use
|
|
10760
|
-
* document fields and what analyzer to use for that purpose.
|
|
10796
|
+
* * `default_analyzer` - the default text analyzer to use
|
|
10797
|
+
* * `default_field` - whether to index the text in all document fields and what analyzer to use for that purpose.
|
|
10761
10798
|
*/
|
|
10762
10799
|
def;
|
|
10763
10800
|
/** Index name. */
|
|
@@ -12528,7 +12565,9 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
12528
12565
|
* Schema for a search index definition.
|
|
12529
12566
|
*/
|
|
12530
12567
|
class SearchIndexDefinition {
|
|
12531
|
-
/**
|
|
12568
|
+
/** Analyzer configuration for search indexes. The default and fields properties are only applicable for the
|
|
12569
|
+
* `perfield` analyzer name.
|
|
12570
|
+
*/
|
|
12532
12571
|
analyzer;
|
|
12533
12572
|
/** String form of a JavaScript function that is called for each document in the database. The function takes
|
|
12534
12573
|
* the document as a parameter, extracts some data from it, and then calls the `index` function to index that data.
|