@azure/search-documents 11.3.1 → 11.3.3
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 +19 -41
- package/dist/index.js +786 -1021
- package/dist/index.js.map +1 -1
- package/dist-esm/src/constants.js +1 -1
- package/dist-esm/src/constants.js.map +1 -1
- package/dist-esm/src/generated/data/index.js +1 -0
- package/dist-esm/src/generated/data/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/data/models/parameters.js +11 -21
- package/dist-esm/src/generated/data/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/data/operations/documents.js +21 -73
- package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
- package/dist-esm/src/generated/data/operationsInterfaces/documents.js +9 -0
- package/dist-esm/src/generated/data/operationsInterfaces/documents.js.map +1 -0
- package/dist-esm/src/generated/data/operationsInterfaces/index.js +9 -0
- package/dist-esm/src/generated/data/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/generated/data/searchClient.js +2 -2
- package/dist-esm/src/generated/data/searchClient.js.map +1 -1
- package/dist-esm/src/generated/data/searchClientContext.js +7 -11
- package/dist-esm/src/generated/data/searchClientContext.js.map +1 -1
- package/dist-esm/src/generated/service/index.js +1 -0
- package/dist-esm/src/generated/service/index.js.map +1 -1
- package/dist-esm/src/generated/service/models/index.js.map +1 -1
- package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/service/models/parameters.js +0 -9
- package/dist-esm/src/generated/service/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/service/operations/dataSources.js +11 -37
- package/dist-esm/src/generated/service/operations/dataSources.js.map +1 -1
- package/dist-esm/src/generated/service/operations/indexers.js +17 -55
- package/dist-esm/src/generated/service/operations/indexers.js.map +1 -1
- package/dist-esm/src/generated/service/operations/indexes.js +15 -54
- package/dist-esm/src/generated/service/operations/indexes.js.map +1 -1
- package/dist-esm/src/generated/service/operations/skillsets.js +11 -37
- package/dist-esm/src/generated/service/operations/skillsets.js.map +1 -1
- package/dist-esm/src/generated/service/operations/synonymMaps.js +11 -37
- package/dist-esm/src/generated/service/operations/synonymMaps.js.map +1 -1
- package/dist-esm/src/generated/service/operationsInterfaces/dataSources.js +9 -0
- package/dist-esm/src/generated/service/operationsInterfaces/dataSources.js.map +1 -0
- package/dist-esm/src/generated/service/operationsInterfaces/index.js +13 -0
- package/dist-esm/src/generated/service/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/generated/service/operationsInterfaces/indexers.js +9 -0
- package/dist-esm/src/generated/service/operationsInterfaces/indexers.js.map +1 -0
- package/dist-esm/src/generated/service/operationsInterfaces/indexes.js +9 -0
- package/dist-esm/src/generated/service/operationsInterfaces/indexes.js.map +1 -0
- package/dist-esm/src/generated/service/operationsInterfaces/skillsets.js +9 -0
- package/dist-esm/src/generated/service/operationsInterfaces/skillsets.js.map +1 -0
- package/dist-esm/src/generated/service/operationsInterfaces/synonymMaps.js +9 -0
- package/dist-esm/src/generated/service/operationsInterfaces/synonymMaps.js.map +1 -0
- package/dist-esm/src/generated/service/searchServiceClient.js +10 -13
- package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
- package/dist-esm/src/generated/service/searchServiceClientContext.js +7 -11
- package/dist-esm/src/generated/service/searchServiceClientContext.js.map +1 -1
- package/dist-esm/src/geographyPoint.js +1 -1
- package/dist-esm/src/geographyPoint.js.map +1 -1
- package/dist-esm/src/index.js +2 -2
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/indexDocumentsBatch.js +1 -1
- package/dist-esm/src/indexDocumentsBatch.js.map +1 -1
- package/dist-esm/src/indexModels.js.map +1 -1
- package/dist-esm/src/odataMetadataPolicy.js +7 -15
- package/dist-esm/src/odataMetadataPolicy.js.map +1 -1
- package/dist-esm/src/searchApiKeyCredentialPolicy.js +8 -21
- package/dist-esm/src/searchApiKeyCredentialPolicy.js.map +1 -1
- package/dist-esm/src/searchAudience.js.map +1 -1
- package/dist-esm/src/searchClient.js +108 -126
- package/dist-esm/src/searchClient.js.map +1 -1
- package/dist-esm/src/searchIndexClient.js +112 -101
- package/dist-esm/src/searchIndexClient.js.map +1 -1
- package/dist-esm/src/searchIndexerClient.js +94 -106
- package/dist-esm/src/searchIndexerClient.js.map +1 -1
- package/dist-esm/src/searchIndexingBufferedSender.js +16 -17
- package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
- package/dist-esm/src/serialization.js +6 -6
- package/dist-esm/src/serialization.js.map +1 -1
- package/dist-esm/src/serviceModels.js.map +1 -1
- package/dist-esm/src/serviceUtils.js +43 -61
- package/dist-esm/src/serviceUtils.js.map +1 -1
- package/dist-esm/src/synonymMapHelper.js +6 -2
- package/dist-esm/src/synonymMapHelper.js.map +1 -1
- package/dist-esm/src/tracing.js +6 -5
- package/dist-esm/src/tracing.js.map +1 -1
- package/package.json +53 -53
- package/types/search-documents.d.ts +137 -117
- package/CHANGELOG.md +0 -233
- package/dist-esm/src/generated/data/models/documentsMappers.js +0 -9
- package/dist-esm/src/generated/data/models/documentsMappers.js.map +0 -1
- package/dist-esm/src/generated/service/models/dataSourcesMappers.js +0 -9
- package/dist-esm/src/generated/service/models/dataSourcesMappers.js.map +0 -1
- package/dist-esm/src/generated/service/models/indexersMappers.js +0 -9
- package/dist-esm/src/generated/service/models/indexersMappers.js.map +0 -1
- package/dist-esm/src/generated/service/models/indexesMappers.js +0 -9
- package/dist-esm/src/generated/service/models/indexesMappers.js.map +0 -1
- package/dist-esm/src/generated/service/models/skillsetsMappers.js +0 -9
- package/dist-esm/src/generated/service/models/skillsetsMappers.js.map +0 -1
- package/dist-esm/src/generated/service/models/synonymMapsMappers.js +0 -9
- package/dist-esm/src/generated/service/models/synonymMapsMappers.js.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference lib="esnext.asynciterable" />
|
|
2
|
+
|
|
2
3
|
import { AzureKeyCredential } from '@azure/core-auth';
|
|
4
|
+
import { ExtendedCommonClientOptions } from '@azure/core-http-compat';
|
|
3
5
|
import { KeyCredential } from '@azure/core-auth';
|
|
4
|
-
import { OperationOptions } from '@azure/core-
|
|
6
|
+
import { OperationOptions } from '@azure/core-client';
|
|
5
7
|
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
|
6
|
-
import {
|
|
7
|
-
import { RestError } from '@azure/core-http';
|
|
8
|
+
import { RestError } from '@azure/core-rest-pipeline';
|
|
8
9
|
import { TokenCredential } from '@azure/core-auth';
|
|
9
10
|
|
|
10
11
|
/** Information about a token returned by an analyzer. */
|
|
@@ -104,12 +105,12 @@ export declare type AutocompleteMode = "oneTerm" | "twoTerms" | "oneTermWithCont
|
|
|
104
105
|
/**
|
|
105
106
|
* Options for retrieving completion text for a partial searchText.
|
|
106
107
|
*/
|
|
107
|
-
export declare type AutocompleteOptions<
|
|
108
|
+
export declare type AutocompleteOptions<TFields> = OperationOptions & AutocompleteRequest<TFields>;
|
|
108
109
|
|
|
109
110
|
/**
|
|
110
111
|
* Parameters for fuzzy matching, and other autocomplete query behaviors.
|
|
111
112
|
*/
|
|
112
|
-
export declare interface AutocompleteRequest<
|
|
113
|
+
export declare interface AutocompleteRequest<TFields> {
|
|
113
114
|
/**
|
|
114
115
|
* Specifies the mode for Autocomplete. The default is 'oneTerm'. Use 'twoTerms' to get shingles
|
|
115
116
|
* and 'oneTermWithContext' to use the current context while producing auto-completed terms.
|
|
@@ -150,7 +151,7 @@ export declare interface AutocompleteRequest<Fields> {
|
|
|
150
151
|
* The comma-separated list of field names to consider when querying for auto-completed terms.
|
|
151
152
|
* Target fields must be included in the specified suggester.
|
|
152
153
|
*/
|
|
153
|
-
searchFields?:
|
|
154
|
+
searchFields?: TFields[] | string[];
|
|
154
155
|
/**
|
|
155
156
|
* The number of auto-completed terms to retrieve. This must be a value between 1 and 100. The
|
|
156
157
|
* default is 5.
|
|
@@ -179,6 +180,7 @@ export declare interface AzureActiveDirectoryApplicationCredentials {
|
|
|
179
180
|
/** The authentication key of the specified AAD application. */
|
|
180
181
|
applicationSecret?: string;
|
|
181
182
|
}
|
|
183
|
+
|
|
182
184
|
export { AzureKeyCredential }
|
|
183
185
|
|
|
184
186
|
/** Base type for character filters. */
|
|
@@ -327,7 +329,7 @@ export declare type CharFilter = MappingCharFilter | PatternReplaceCharFilter;
|
|
|
327
329
|
* {@link KnownCharFilterName} can be used interchangeably with CharFilterName,
|
|
328
330
|
* this enum contains the known values that the service supports.
|
|
329
331
|
* ### Know values supported by the service
|
|
330
|
-
* **html_strip**: A character filter that attempts to strip out HTML constructs. See https
|
|
332
|
+
* **html_strip**: A character filter that attempts to strip out HTML constructs. See https:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/charfilter\/HTMLStripCharFilter.html
|
|
331
333
|
*/
|
|
332
334
|
export declare type CharFilterName = string;
|
|
333
335
|
|
|
@@ -450,7 +452,7 @@ export declare type CreateIndexOptions = OperationOptions;
|
|
|
450
452
|
*/
|
|
451
453
|
export declare interface CreateorUpdateDataSourceConnectionOptions extends OperationOptions {
|
|
452
454
|
/**
|
|
453
|
-
* If set to true, Resource will be
|
|
455
|
+
* If set to true, Resource will be updated only if the etag matches.
|
|
454
456
|
*/
|
|
455
457
|
onlyIfUnchanged?: boolean;
|
|
456
458
|
}
|
|
@@ -460,7 +462,7 @@ export declare interface CreateorUpdateDataSourceConnectionOptions extends Opera
|
|
|
460
462
|
*/
|
|
461
463
|
export declare interface CreateorUpdateIndexerOptions extends OperationOptions {
|
|
462
464
|
/**
|
|
463
|
-
* If set to true, Resource will be
|
|
465
|
+
* If set to true, Resource will be updated only if the etag matches.
|
|
464
466
|
*/
|
|
465
467
|
onlyIfUnchanged?: boolean;
|
|
466
468
|
}
|
|
@@ -487,7 +489,7 @@ export declare interface CreateOrUpdateIndexOptions extends OperationOptions {
|
|
|
487
489
|
*/
|
|
488
490
|
export declare interface CreateOrUpdateSkillsetOptions extends OperationOptions {
|
|
489
491
|
/**
|
|
490
|
-
* If set to true, Resource will be
|
|
492
|
+
* If set to true, Resource will be updated only if the etag matches.
|
|
491
493
|
*/
|
|
492
494
|
onlyIfUnchanged?: boolean;
|
|
493
495
|
}
|
|
@@ -497,7 +499,7 @@ export declare interface CreateOrUpdateSkillsetOptions extends OperationOptions
|
|
|
497
499
|
*/
|
|
498
500
|
export declare interface CreateOrUpdateSynonymMapOptions extends OperationOptions {
|
|
499
501
|
/**
|
|
500
|
-
* If set to true, Resource will be
|
|
502
|
+
* If set to true, Resource will be updated only if the etag matches.
|
|
501
503
|
*/
|
|
502
504
|
onlyIfUnchanged?: boolean;
|
|
503
505
|
}
|
|
@@ -832,7 +834,12 @@ export declare type ElisionTokenFilter = BaseTokenFilter & {
|
|
|
832
834
|
*/
|
|
833
835
|
export declare type EntityCategory = string;
|
|
834
836
|
|
|
835
|
-
/**
|
|
837
|
+
/**
|
|
838
|
+
* Text analytics entity recognition.
|
|
839
|
+
*
|
|
840
|
+
* @deprecated EntityRecognitionSkill has been deprecated. See
|
|
841
|
+
* https://learn.microsoft.com/en-us/azure/search/cognitive-search-skill-deprecated
|
|
842
|
+
*/
|
|
836
843
|
export declare type EntityRecognitionSkill = BaseSearchIndexerSkill & {
|
|
837
844
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
838
845
|
odatatype: "#Microsoft.Skills.Text.EntityRecognitionSkill";
|
|
@@ -957,12 +964,12 @@ export declare type GetDataSourceConnectionOptions = OperationOptions;
|
|
|
957
964
|
/**
|
|
958
965
|
* Options for retrieving a single document.
|
|
959
966
|
*/
|
|
960
|
-
export declare interface GetDocumentOptions<
|
|
967
|
+
export declare interface GetDocumentOptions<TFields> extends OperationOptions {
|
|
961
968
|
/**
|
|
962
969
|
* List of field names to retrieve for the document; Any field not retrieved will be missing from
|
|
963
970
|
* the returned document.
|
|
964
971
|
*/
|
|
965
|
-
selectedFields?:
|
|
972
|
+
selectedFields?: TFields[] | string[];
|
|
966
973
|
}
|
|
967
974
|
|
|
968
975
|
/**
|
|
@@ -1049,58 +1056,58 @@ export declare type IndexActionType = "upload" | "merge" | "mergeOrUpload" | "de
|
|
|
1049
1056
|
/**
|
|
1050
1057
|
* Represents an index action that operates on a document.
|
|
1051
1058
|
*/
|
|
1052
|
-
export declare type IndexDocumentsAction<
|
|
1059
|
+
export declare type IndexDocumentsAction<TModel> = {
|
|
1053
1060
|
/**
|
|
1054
1061
|
* The operation to perform on a document in an indexing batch. Possible values include:
|
|
1055
1062
|
* 'upload', 'merge', 'mergeOrUpload', 'delete'
|
|
1056
1063
|
*/
|
|
1057
1064
|
__actionType: IndexActionType;
|
|
1058
|
-
} & Partial<
|
|
1065
|
+
} & Partial<TModel>;
|
|
1059
1066
|
|
|
1060
1067
|
/**
|
|
1061
1068
|
* Class used to perform batch operations
|
|
1062
1069
|
* with multiple documents to the index.
|
|
1063
1070
|
*/
|
|
1064
|
-
export declare class IndexDocumentsBatch<
|
|
1071
|
+
export declare class IndexDocumentsBatch<TModel> {
|
|
1065
1072
|
/**
|
|
1066
1073
|
* The set of actions taken in this batch.
|
|
1067
1074
|
*/
|
|
1068
|
-
readonly actions: IndexDocumentsAction<
|
|
1069
|
-
constructor(actions?: IndexDocumentsAction<
|
|
1075
|
+
readonly actions: IndexDocumentsAction<TModel>[];
|
|
1076
|
+
constructor(actions?: IndexDocumentsAction<TModel>[]);
|
|
1070
1077
|
/**
|
|
1071
1078
|
* Upload an array of documents to the index.
|
|
1072
1079
|
* @param documents - The documents to upload.
|
|
1073
1080
|
*/
|
|
1074
|
-
upload(documents:
|
|
1081
|
+
upload(documents: TModel[]): void;
|
|
1075
1082
|
/**
|
|
1076
1083
|
* Update a set of documents in the index.
|
|
1077
1084
|
* For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents
|
|
1078
1085
|
* @param documents - The updated documents.
|
|
1079
1086
|
*/
|
|
1080
|
-
merge(documents:
|
|
1087
|
+
merge(documents: TModel[]): void;
|
|
1081
1088
|
/**
|
|
1082
1089
|
* Update a set of documents in the index or uploads them if they don't exist.
|
|
1083
1090
|
* For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents
|
|
1084
1091
|
* @param documents - The new/updated documents.
|
|
1085
1092
|
*/
|
|
1086
|
-
mergeOrUpload(documents:
|
|
1093
|
+
mergeOrUpload(documents: TModel[]): void;
|
|
1087
1094
|
/**
|
|
1088
1095
|
* Delete a set of documents.
|
|
1089
1096
|
* @param keyName - The name of their primary key in the index.
|
|
1090
1097
|
* @param keyValues - The primary key values of documents to delete.
|
|
1091
1098
|
*/
|
|
1092
|
-
delete(keyName: keyof
|
|
1099
|
+
delete(keyName: keyof TModel, keyValues: string[]): void;
|
|
1093
1100
|
/**
|
|
1094
1101
|
* Delete a set of documents.
|
|
1095
1102
|
* @param documents - Documents to be deleted.
|
|
1096
1103
|
*/
|
|
1097
|
-
delete(documents:
|
|
1104
|
+
delete(documents: TModel[]): void;
|
|
1098
1105
|
}
|
|
1099
1106
|
|
|
1100
1107
|
/**
|
|
1101
1108
|
* Index Documents Client
|
|
1102
1109
|
*/
|
|
1103
|
-
export declare interface IndexDocumentsClient<
|
|
1110
|
+
export declare interface IndexDocumentsClient<TModel> {
|
|
1104
1111
|
/**
|
|
1105
1112
|
* Perform a set of index modifications (upload, merge, mergeOrUpload, delete)
|
|
1106
1113
|
* for the given set of documents.
|
|
@@ -1108,7 +1115,7 @@ export declare interface IndexDocumentsClient<T> {
|
|
|
1108
1115
|
* @param batch - An array of actions to perform on the index.
|
|
1109
1116
|
* @param options - Additional options.
|
|
1110
1117
|
*/
|
|
1111
|
-
indexDocuments(batch: IndexDocumentsBatch<
|
|
1118
|
+
indexDocuments(batch: IndexDocumentsBatch<TModel>, options: IndexDocumentsOptions): Promise<IndexDocumentsResult>;
|
|
1112
1119
|
}
|
|
1113
1120
|
|
|
1114
1121
|
/**
|
|
@@ -2930,12 +2937,12 @@ export declare type LexicalAnalyzer = CustomAnalyzer | PatternAnalyzer | LuceneS
|
|
|
2930
2937
|
* **ur.microsoft**: Microsoft analyzer for Urdu. \
|
|
2931
2938
|
* **vi.microsoft**: Microsoft analyzer for Vietnamese. \
|
|
2932
2939
|
* **standard.lucene**: Standard Lucene analyzer. \
|
|
2933
|
-
* **standardasciifolding.lucene**: Standard ASCII Folding Lucene analyzer. See https
|
|
2934
|
-
* **keyword**: Treats the entire content of a field as a single token. This is useful for data like zip codes, ids, and some product names. See http
|
|
2935
|
-
* **pattern**: Flexibly separates text into terms via a regular expression pattern. See http
|
|
2936
|
-
* **simple**: Divides text at non-letters and converts them to lower case. See http
|
|
2937
|
-
* **stop**: Divides text at non-letters; Applies the lowercase and stopword token filters. See http
|
|
2938
|
-
* **whitespace**: An analyzer that uses the whitespace tokenizer. See http
|
|
2940
|
+
* **standardasciifolding.lucene**: Standard ASCII Folding Lucene analyzer. See https:\/\/docs.microsoft.com\/rest\/api\/searchservice\/Custom-analyzers-in-Azure-Search#Analyzers \
|
|
2941
|
+
* **keyword**: Treats the entire content of a field as a single token. This is useful for data like zip codes, ids, and some product names. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/core\/KeywordAnalyzer.html \
|
|
2942
|
+
* **pattern**: Flexibly separates text into terms via a regular expression pattern. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/miscellaneous\/PatternAnalyzer.html \
|
|
2943
|
+
* **simple**: Divides text at non-letters and converts them to lower case. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/core\/SimpleAnalyzer.html \
|
|
2944
|
+
* **stop**: Divides text at non-letters; Applies the lowercase and stopword token filters. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/core\/StopAnalyzer.html \
|
|
2945
|
+
* **whitespace**: An analyzer that uses the whitespace tokenizer. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/core\/WhitespaceAnalyzer.html
|
|
2939
2946
|
*/
|
|
2940
2947
|
export declare type LexicalAnalyzerName = string;
|
|
2941
2948
|
|
|
@@ -3407,7 +3414,7 @@ export declare type ScoringStatistics = "local" | "global";
|
|
|
3407
3414
|
* including querying documents in the index as well as
|
|
3408
3415
|
* adding, updating, and removing them.
|
|
3409
3416
|
*/
|
|
3410
|
-
export declare class SearchClient<
|
|
3417
|
+
export declare class SearchClient<TModel> implements IndexDocumentsClient<TModel> {
|
|
3411
3418
|
/**
|
|
3412
3419
|
* The API version to use when communicating with the service.
|
|
3413
3420
|
*/
|
|
@@ -3431,13 +3438,18 @@ export declare class SearchClient<T> implements IndexDocumentsClient<T> {
|
|
|
3431
3438
|
* const client = new SearchClient(
|
|
3432
3439
|
* "<endpoint>",
|
|
3433
3440
|
* "<indexName>",
|
|
3434
|
-
* new AzureKeyCredential("<Admin Key>")
|
|
3441
|
+
* new AzureKeyCredential("<Admin Key>")
|
|
3435
3442
|
* );
|
|
3436
3443
|
* ```
|
|
3437
3444
|
* @param endpoint - The endpoint of the search service
|
|
3438
3445
|
* @param indexName - The name of the index
|
|
3439
3446
|
* @param credential - Used to authenticate requests to the service.
|
|
3440
3447
|
* @param options - Used to configure the Search client.
|
|
3448
|
+
*
|
|
3449
|
+
* @typeParam TModel - An optional type that represents the documents stored in
|
|
3450
|
+
* the search index. For the best typing experience, all non-key fields should
|
|
3451
|
+
* be marked optional and nullable, and the key property should have the
|
|
3452
|
+
* non-nullable type `string`.
|
|
3441
3453
|
*/
|
|
3442
3454
|
constructor(endpoint: string, indexName: string, credential: KeyCredential | TokenCredential, options?: SearchClientOptions);
|
|
3443
3455
|
/**
|
|
@@ -3452,7 +3464,7 @@ export declare class SearchClient<T> implements IndexDocumentsClient<T> {
|
|
|
3452
3464
|
* @param suggesterName - The name of the suggester as specified in the suggesters collection that's part of the index definition.
|
|
3453
3465
|
* @param options - Options to the autocomplete operation.
|
|
3454
3466
|
*/
|
|
3455
|
-
autocomplete<
|
|
3467
|
+
autocomplete<TFields extends keyof TModel>(searchText: string, suggesterName: string, options?: AutocompleteOptions<TFields>): Promise<AutocompleteResult>;
|
|
3456
3468
|
private searchDocuments;
|
|
3457
3469
|
private listSearchResultsPage;
|
|
3458
3470
|
private listSearchResultsAll;
|
|
@@ -3463,7 +3475,7 @@ export declare class SearchClient<T> implements IndexDocumentsClient<T> {
|
|
|
3463
3475
|
* @param searchText - Text to search
|
|
3464
3476
|
* @param options - Options for the search operation.
|
|
3465
3477
|
*/
|
|
3466
|
-
search<
|
|
3478
|
+
search<TFields extends keyof TModel>(searchText?: string, options?: SearchOptions<TFields>): Promise<SearchDocumentsResult<Pick<TModel, TFields>>>;
|
|
3467
3479
|
/**
|
|
3468
3480
|
* Returns a short list of suggestions based on the searchText
|
|
3469
3481
|
* and specified suggester.
|
|
@@ -3471,13 +3483,13 @@ export declare class SearchClient<T> implements IndexDocumentsClient<T> {
|
|
|
3471
3483
|
* @param suggesterName - The name of the suggester as specified in the suggesters collection that's part of the index definition.
|
|
3472
3484
|
* @param options - Options for the suggest operation
|
|
3473
3485
|
*/
|
|
3474
|
-
suggest<
|
|
3486
|
+
suggest<TFields extends keyof TModel = never>(searchText: string, suggesterName: string, options?: SuggestOptions<TFields>): Promise<SuggestDocumentsResult<Pick<TModel, TFields>>>;
|
|
3475
3487
|
/**
|
|
3476
3488
|
* Retrieve a particular document from the index by key.
|
|
3477
3489
|
* @param key - The primary key value of the document
|
|
3478
3490
|
* @param options - Additional options
|
|
3479
3491
|
*/
|
|
3480
|
-
getDocument<
|
|
3492
|
+
getDocument<TFields extends Extract<keyof TModel, string>>(key: string, options?: GetDocumentOptions<TFields>): Promise<TModel>;
|
|
3481
3493
|
/**
|
|
3482
3494
|
* Perform a set of index modifications (upload, merge, mergeOrUpload, delete)
|
|
3483
3495
|
* for the given set of documents.
|
|
@@ -3488,43 +3500,42 @@ export declare class SearchClient<T> implements IndexDocumentsClient<T> {
|
|
|
3488
3500
|
* @param batch - An array of actions to perform on the index.
|
|
3489
3501
|
* @param options - Additional options.
|
|
3490
3502
|
*/
|
|
3491
|
-
indexDocuments(batch: IndexDocumentsBatch<
|
|
3503
|
+
indexDocuments(batch: IndexDocumentsBatch<TModel>, options?: IndexDocumentsOptions): Promise<IndexDocumentsResult>;
|
|
3492
3504
|
/**
|
|
3493
3505
|
* Upload an array of documents to the index.
|
|
3494
3506
|
* @param documents - The documents to upload.
|
|
3495
3507
|
* @param options - Additional options.
|
|
3496
3508
|
*/
|
|
3497
|
-
uploadDocuments(documents:
|
|
3509
|
+
uploadDocuments(documents: TModel[], options?: UploadDocumentsOptions): Promise<IndexDocumentsResult>;
|
|
3498
3510
|
/**
|
|
3499
3511
|
* Update a set of documents in the index.
|
|
3500
3512
|
* For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents
|
|
3501
3513
|
* @param documents - The updated documents.
|
|
3502
3514
|
* @param options - Additional options.
|
|
3503
3515
|
*/
|
|
3504
|
-
mergeDocuments(documents:
|
|
3516
|
+
mergeDocuments(documents: TModel[], options?: MergeDocumentsOptions): Promise<IndexDocumentsResult>;
|
|
3505
3517
|
/**
|
|
3506
3518
|
* Update a set of documents in the index or upload them if they don't exist.
|
|
3507
3519
|
* For more details about how merging works, see https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents
|
|
3508
3520
|
* @param documents - The updated documents.
|
|
3509
3521
|
* @param options - Additional options.
|
|
3510
3522
|
*/
|
|
3511
|
-
mergeOrUploadDocuments(documents:
|
|
3523
|
+
mergeOrUploadDocuments(documents: TModel[], options?: MergeOrUploadDocumentsOptions): Promise<IndexDocumentsResult>;
|
|
3512
3524
|
/**
|
|
3513
3525
|
* Delete a set of documents.
|
|
3514
3526
|
* @param documents - Documents to be deleted.
|
|
3515
3527
|
* @param options - Additional options.
|
|
3516
3528
|
*/
|
|
3517
|
-
deleteDocuments(documents:
|
|
3529
|
+
deleteDocuments(documents: TModel[], options?: DeleteDocumentsOptions): Promise<IndexDocumentsResult>;
|
|
3518
3530
|
/**
|
|
3519
3531
|
* Delete a set of documents.
|
|
3520
3532
|
* @param keyName - The name of their primary key in the index.
|
|
3521
3533
|
* @param keyValues - The primary key values of documents to delete.
|
|
3522
3534
|
* @param options - Additional options.
|
|
3523
3535
|
*/
|
|
3524
|
-
deleteDocuments(keyName: keyof
|
|
3536
|
+
deleteDocuments(keyName: keyof TModel, keyValues: string[], options?: DeleteDocumentsOptions): Promise<IndexDocumentsResult>;
|
|
3525
3537
|
private encodeContinuationToken;
|
|
3526
3538
|
private decodeContinuationToken;
|
|
3527
|
-
private extractOperationOptions;
|
|
3528
3539
|
private convertSelect;
|
|
3529
3540
|
private convertSearchFields;
|
|
3530
3541
|
private convertOrderBy;
|
|
@@ -3533,7 +3544,7 @@ export declare class SearchClient<T> implements IndexDocumentsClient<T> {
|
|
|
3533
3544
|
/**
|
|
3534
3545
|
* Client options used to configure Cognitive Search API requests.
|
|
3535
3546
|
*/
|
|
3536
|
-
export declare interface SearchClientOptions extends
|
|
3547
|
+
export declare interface SearchClientOptions extends ExtendedCommonClientOptions {
|
|
3537
3548
|
/**
|
|
3538
3549
|
* The API version to use when communicating with the service.
|
|
3539
3550
|
*/
|
|
@@ -3549,12 +3560,12 @@ export declare interface SearchClientOptions extends PipelineOptions {
|
|
|
3549
3560
|
/**
|
|
3550
3561
|
* Response containing search page results from an index.
|
|
3551
3562
|
*/
|
|
3552
|
-
export declare interface SearchDocumentsPageResult<
|
|
3563
|
+
export declare interface SearchDocumentsPageResult<TModel> extends SearchDocumentsResultBase {
|
|
3553
3564
|
/**
|
|
3554
3565
|
* The sequence of results returned by the query.
|
|
3555
3566
|
* **NOTE: This property will not be serialized. It can only be populated by the server.**
|
|
3556
3567
|
*/
|
|
3557
|
-
readonly results: SearchResult<
|
|
3568
|
+
readonly results: SearchResult<TModel>[];
|
|
3558
3569
|
/**
|
|
3559
3570
|
* A token used for retrieving the next page of results when the server
|
|
3560
3571
|
* enforces pagination.
|
|
@@ -3565,12 +3576,12 @@ export declare interface SearchDocumentsPageResult<T> extends SearchDocumentsRes
|
|
|
3565
3576
|
/**
|
|
3566
3577
|
* Response containing search results from an index.
|
|
3567
3578
|
*/
|
|
3568
|
-
export declare interface SearchDocumentsResult<
|
|
3579
|
+
export declare interface SearchDocumentsResult<TModel> extends SearchDocumentsResultBase {
|
|
3569
3580
|
/**
|
|
3570
3581
|
* The sequence of results returned by the query.
|
|
3571
3582
|
* **NOTE: This property will not be serialized. It can only be populated by the server.**
|
|
3572
3583
|
*/
|
|
3573
|
-
readonly results: SearchIterator<
|
|
3584
|
+
readonly results: SearchIterator<TModel>;
|
|
3574
3585
|
}
|
|
3575
3586
|
|
|
3576
3587
|
/**
|
|
@@ -3610,9 +3621,9 @@ export declare type SearchField = SimpleField | ComplexField;
|
|
|
3610
3621
|
/**
|
|
3611
3622
|
* Defines values for SearchFieldDataType.
|
|
3612
3623
|
* Possible values include: 'Edm.String', 'Edm.Int32', 'Edm.Int64', 'Edm.Double', 'Edm.Boolean',
|
|
3613
|
-
* 'Edm.DateTimeOffset', 'Edm.GeographyPoint', 'Collection(Edm.String)',
|
|
3614
|
-
* 'Collection(Edm.
|
|
3615
|
-
* 'Collection(Edm.
|
|
3624
|
+
* 'Edm.DateTimeOffset', 'Edm.GeographyPoint', 'Collection(Edm.String)', 'Collection(Edm.Int32)',
|
|
3625
|
+
* 'Collection(Edm.Int64)', 'Collection(Edm.Double)', 'Collection(Edm.Boolean)',
|
|
3626
|
+
* 'Collection(Edm.DateTimeOffset)', 'Collection(Edm.GeographyPoint)'
|
|
3616
3627
|
* @readonly
|
|
3617
3628
|
*/
|
|
3618
3629
|
export declare type SearchFieldDataType = "Edm.String" | "Edm.Int32" | "Edm.Int64" | "Edm.Double" | "Edm.Boolean" | "Edm.DateTimeOffset" | "Edm.GeographyPoint" | "Collection(Edm.String)" | "Collection(Edm.Int32)" | "Collection(Edm.Int64)" | "Collection(Edm.Double)" | "Collection(Edm.Boolean)" | "Collection(Edm.DateTimeOffset)" | "Collection(Edm.GeographyPoint)";
|
|
@@ -3822,14 +3833,18 @@ export declare class SearchIndexClient {
|
|
|
3822
3833
|
* Retrieves the SearchClient corresponding to this SearchIndexClient
|
|
3823
3834
|
* @param indexName - Name of the index
|
|
3824
3835
|
* @param options - SearchClient Options
|
|
3836
|
+
* @typeParam TModel - An optional type that represents the documents stored in
|
|
3837
|
+
* the search index. For the best typing experience, all non-key fields should
|
|
3838
|
+
* be marked optional and nullable, and the key property should have the
|
|
3839
|
+
* non-nullable type `string`.
|
|
3825
3840
|
*/
|
|
3826
|
-
getSearchClient<
|
|
3841
|
+
getSearchClient<TModel>(indexName: string, options?: SearchClientOptions): SearchClient<TModel>;
|
|
3827
3842
|
}
|
|
3828
3843
|
|
|
3829
3844
|
/**
|
|
3830
3845
|
* Client options used to configure Cognitive Search API requests.
|
|
3831
3846
|
*/
|
|
3832
|
-
export declare interface SearchIndexClientOptions extends
|
|
3847
|
+
export declare interface SearchIndexClientOptions extends ExtendedCommonClientOptions {
|
|
3833
3848
|
/**
|
|
3834
3849
|
* The API version to use when communicating with the service.
|
|
3835
3850
|
*/
|
|
@@ -4062,7 +4077,7 @@ export declare class SearchIndexerClient {
|
|
|
4062
4077
|
/**
|
|
4063
4078
|
* Client options used to configure Cognitive Search API requests.
|
|
4064
4079
|
*/
|
|
4065
|
-
export declare interface SearchIndexerClientOptions extends
|
|
4080
|
+
export declare interface SearchIndexerClientOptions extends ExtendedCommonClientOptions {
|
|
4066
4081
|
/**
|
|
4067
4082
|
* The API version to use when communicating with the service.
|
|
4068
4083
|
*/
|
|
@@ -4353,7 +4368,7 @@ export declare interface SearchIndexerWarning {
|
|
|
4353
4368
|
* Class used to perform buffered operations against a search index,
|
|
4354
4369
|
* including adding, updating, and removing them.
|
|
4355
4370
|
*/
|
|
4356
|
-
export declare class SearchIndexingBufferedSender<
|
|
4371
|
+
export declare class SearchIndexingBufferedSender<TModel> {
|
|
4357
4372
|
/**
|
|
4358
4373
|
* Search Client used to call the underlying IndexBatch operations.
|
|
4359
4374
|
*/
|
|
@@ -4405,35 +4420,35 @@ export declare class SearchIndexingBufferedSender<T> {
|
|
|
4405
4420
|
* @param options - Options to modify auto flush.
|
|
4406
4421
|
*
|
|
4407
4422
|
*/
|
|
4408
|
-
constructor(client: IndexDocumentsClient<
|
|
4423
|
+
constructor(client: IndexDocumentsClient<TModel>, documentKeyRetriever: (document: TModel) => string, options?: SearchIndexingBufferedSenderOptions);
|
|
4409
4424
|
/**
|
|
4410
4425
|
* Uploads the documents/Adds the documents to the upload queue.
|
|
4411
4426
|
*
|
|
4412
4427
|
* @param documents - Documents to be uploaded.
|
|
4413
4428
|
* @param options - Upload options.
|
|
4414
4429
|
*/
|
|
4415
|
-
uploadDocuments(documents:
|
|
4430
|
+
uploadDocuments(documents: TModel[], options?: SearchIndexingBufferedSenderUploadDocumentsOptions): Promise<void>;
|
|
4416
4431
|
/**
|
|
4417
4432
|
* Merges the documents/Adds the documents to the merge queue.
|
|
4418
4433
|
*
|
|
4419
4434
|
* @param documents - Documents to be merged.
|
|
4420
4435
|
* @param options - Upload options.
|
|
4421
4436
|
*/
|
|
4422
|
-
mergeDocuments(documents:
|
|
4437
|
+
mergeDocuments(documents: TModel[], options?: SearchIndexingBufferedSenderMergeDocumentsOptions): Promise<void>;
|
|
4423
4438
|
/**
|
|
4424
4439
|
* Merges/Uploads the documents/Adds the documents to the merge/upload queue.
|
|
4425
4440
|
*
|
|
4426
4441
|
* @param documents - Documents to be merged/uploaded.
|
|
4427
4442
|
* @param options - Upload options.
|
|
4428
4443
|
*/
|
|
4429
|
-
mergeOrUploadDocuments(documents:
|
|
4444
|
+
mergeOrUploadDocuments(documents: TModel[], options?: SearchIndexingBufferedSenderMergeOrUploadDocumentsOptions): Promise<void>;
|
|
4430
4445
|
/**
|
|
4431
4446
|
* Deletes the documents/Adds the documents to the delete queue.
|
|
4432
4447
|
*
|
|
4433
4448
|
* @param documents - Documents to be deleted.
|
|
4434
4449
|
* @param options - Upload options.
|
|
4435
4450
|
*/
|
|
4436
|
-
deleteDocuments(documents:
|
|
4451
|
+
deleteDocuments(documents: TModel[], options?: SearchIndexingBufferedSenderDeleteDocumentsOptions): Promise<void>;
|
|
4437
4452
|
/**
|
|
4438
4453
|
* Flushes the queue manually.
|
|
4439
4454
|
*
|
|
@@ -4452,7 +4467,7 @@ export declare class SearchIndexingBufferedSender<T> {
|
|
|
4452
4467
|
*/
|
|
4453
4468
|
on(event: "batchAdded", listener: (e: {
|
|
4454
4469
|
action: string;
|
|
4455
|
-
documents:
|
|
4470
|
+
documents: TModel[];
|
|
4456
4471
|
}) => void): void;
|
|
4457
4472
|
/**
|
|
4458
4473
|
* Attach Batch Sent Event
|
|
@@ -4460,7 +4475,7 @@ export declare class SearchIndexingBufferedSender<T> {
|
|
|
4460
4475
|
* @param event - Event to be emitted
|
|
4461
4476
|
* @param listener - Event Listener
|
|
4462
4477
|
*/
|
|
4463
|
-
on(event: "beforeDocumentSent", listener: (e: IndexDocumentsAction<
|
|
4478
|
+
on(event: "beforeDocumentSent", listener: (e: IndexDocumentsAction<TModel>) => void): void;
|
|
4464
4479
|
/**
|
|
4465
4480
|
* Attach Batch Succeeded Event
|
|
4466
4481
|
*
|
|
@@ -4483,7 +4498,7 @@ export declare class SearchIndexingBufferedSender<T> {
|
|
|
4483
4498
|
*/
|
|
4484
4499
|
off(event: "batchAdded", listener: (e: {
|
|
4485
4500
|
action: string;
|
|
4486
|
-
documents:
|
|
4501
|
+
documents: TModel[];
|
|
4487
4502
|
}) => void): void;
|
|
4488
4503
|
/**
|
|
4489
4504
|
* Detach Batch Sent Event
|
|
@@ -4491,7 +4506,7 @@ export declare class SearchIndexingBufferedSender<T> {
|
|
|
4491
4506
|
* @param event - Event to be emitted
|
|
4492
4507
|
* @param listener - Event Listener
|
|
4493
4508
|
*/
|
|
4494
|
-
off(event: "beforeDocumentSent", listener: (e: IndexDocumentsAction<
|
|
4509
|
+
off(event: "beforeDocumentSent", listener: (e: IndexDocumentsAction<TModel>) => void): void;
|
|
4495
4510
|
/**
|
|
4496
4511
|
* Detach Batch Succeeded Event
|
|
4497
4512
|
*
|
|
@@ -4596,7 +4611,7 @@ export declare interface SearchIndexStatistics {
|
|
|
4596
4611
|
* as needed during iteration. Use .byPage() to make one request to the server
|
|
4597
4612
|
* per iteration.
|
|
4598
4613
|
*/
|
|
4599
|
-
export declare type SearchIterator<
|
|
4614
|
+
export declare type SearchIterator<TFields> = PagedAsyncIterableIterator<SearchResult<TFields>, SearchDocumentsPageResult<TFields>, ListSearchResultsPageSettings>;
|
|
4600
4615
|
|
|
4601
4616
|
/** Defines values for SearchMode. */
|
|
4602
4617
|
export declare type SearchMode = "any" | "all";
|
|
@@ -4604,7 +4619,7 @@ export declare type SearchMode = "any" | "all";
|
|
|
4604
4619
|
/**
|
|
4605
4620
|
* Options for committing a full search request.
|
|
4606
4621
|
*/
|
|
4607
|
-
export declare type SearchOptions<
|
|
4622
|
+
export declare type SearchOptions<TFields> = OperationOptions & SearchRequestOptions<TFields>;
|
|
4608
4623
|
|
|
4609
4624
|
/**
|
|
4610
4625
|
* Parameters for filtering, sorting, faceting, paging, and other search query behaviors.
|
|
@@ -4726,7 +4741,7 @@ export declare interface SearchRequest {
|
|
|
4726
4741
|
/**
|
|
4727
4742
|
* Parameters for filtering, sorting, faceting, paging, and other search query behaviors.
|
|
4728
4743
|
*/
|
|
4729
|
-
export declare interface SearchRequestOptions<
|
|
4744
|
+
export declare interface SearchRequestOptions<TFields> {
|
|
4730
4745
|
/**
|
|
4731
4746
|
* A value that specifies whether to fetch the total count of results. Default is false. Setting
|
|
4732
4747
|
* this value to true may have a performance impact. Note that the count returned is an
|
|
@@ -4794,7 +4809,7 @@ export declare interface SearchRequestOptions<Fields> {
|
|
|
4794
4809
|
* fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each
|
|
4795
4810
|
* fielded search expression take precedence over any field names listed in this parameter.
|
|
4796
4811
|
*/
|
|
4797
|
-
searchFields?:
|
|
4812
|
+
searchFields?: TFields[] | string[];
|
|
4798
4813
|
/**
|
|
4799
4814
|
* A value that specifies whether any or all of the search terms must be matched in order to
|
|
4800
4815
|
* count the document as a match. Possible values include: 'any', 'all'
|
|
@@ -4818,7 +4833,7 @@ export declare interface SearchRequestOptions<Fields> {
|
|
|
4818
4833
|
* The list of fields to retrieve. If unspecified, all fields marked as
|
|
4819
4834
|
* retrievable in the schema are included.
|
|
4820
4835
|
*/
|
|
4821
|
-
select?:
|
|
4836
|
+
select?: TFields[] | string[];
|
|
4822
4837
|
/**
|
|
4823
4838
|
* The number of search results to skip. This value cannot be greater than 100,000. If you need
|
|
4824
4839
|
* to scan documents in sequence, but cannot use skip due to this limitation, consider using
|
|
@@ -4869,7 +4884,7 @@ export declare interface SearchResourceEncryptionKey {
|
|
|
4869
4884
|
/**
|
|
4870
4885
|
* Contains a document found by a search query, plus associated metadata.
|
|
4871
4886
|
*/
|
|
4872
|
-
export declare type SearchResult<
|
|
4887
|
+
export declare type SearchResult<TModel> = {
|
|
4873
4888
|
/**
|
|
4874
4889
|
* The relevance score of the document compared to other documents returned by the query.
|
|
4875
4890
|
* **NOTE: This property will not be serialized. It can only be populated by the server.**
|
|
@@ -4881,9 +4896,9 @@ export declare type SearchResult<T> = {
|
|
|
4881
4896
|
* **NOTE: This property will not be serialized. It can only be populated by the server.**
|
|
4882
4897
|
*/
|
|
4883
4898
|
readonly highlights?: {
|
|
4884
|
-
[k in keyof
|
|
4899
|
+
[k in keyof TModel]?: string[];
|
|
4885
4900
|
};
|
|
4886
|
-
document:
|
|
4901
|
+
document: TModel;
|
|
4887
4902
|
};
|
|
4888
4903
|
|
|
4889
4904
|
/**
|
|
@@ -4911,7 +4926,12 @@ export declare interface SearchSuggester {
|
|
|
4911
4926
|
sourceFields: string[];
|
|
4912
4927
|
}
|
|
4913
4928
|
|
|
4914
|
-
/**
|
|
4929
|
+
/**
|
|
4930
|
+
* Text analytics positive-negative sentiment analysis, scored as a floating point value in a range of zero to 1.
|
|
4931
|
+
*
|
|
4932
|
+
* @deprecated SentimentSkill has been deprecated. See
|
|
4933
|
+
* https://learn.microsoft.com/en-us/azure/search/cognitive-search-skill-deprecated
|
|
4934
|
+
*/
|
|
4915
4935
|
export declare type SentimentSkill = BaseSearchIndexerSkill & {
|
|
4916
4936
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
4917
4937
|
odatatype: "#Microsoft.Skills.Text.SentimentSkill";
|
|
@@ -5019,7 +5039,7 @@ export declare interface SimpleField {
|
|
|
5019
5039
|
name: string;
|
|
5020
5040
|
/**
|
|
5021
5041
|
* The data type of the field. Possible values include: 'Edm.String', 'Edm.Int32', 'Edm.Int64',
|
|
5022
|
-
* 'Edm.Double', 'Edm.Boolean', 'Edm.DateTimeOffset', 'Edm.GeographyPoint'
|
|
5042
|
+
* 'Edm.Double', 'Edm.Boolean', 'Edm.DateTimeOffset', 'Edm.GeographyPoint',
|
|
5023
5043
|
* 'Collection(Edm.String)', 'Collection(Edm.Int32)', 'Collection(Edm.Int64)',
|
|
5024
5044
|
* 'Collection(Edm.Double)', 'Collection(Edm.Boolean)', 'Collection(Edm.DateTimeOffset)',
|
|
5025
5045
|
* 'Collection(Edm.GeographyPoint)'
|
|
@@ -5213,12 +5233,12 @@ export declare type StopwordsTokenFilter = BaseTokenFilter & {
|
|
|
5213
5233
|
/**
|
|
5214
5234
|
* Response containing suggestion query results from an index.
|
|
5215
5235
|
*/
|
|
5216
|
-
export declare interface SuggestDocumentsResult<
|
|
5236
|
+
export declare interface SuggestDocumentsResult<TModel> {
|
|
5217
5237
|
/**
|
|
5218
5238
|
* The sequence of results returned by the query.
|
|
5219
5239
|
* **NOTE: This property will not be serialized. It can only be populated by the server.**
|
|
5220
5240
|
*/
|
|
5221
|
-
readonly results: SuggestResult<
|
|
5241
|
+
readonly results: SuggestResult<TModel>[];
|
|
5222
5242
|
/**
|
|
5223
5243
|
* A value indicating the percentage of the index that was included in the query, or null if
|
|
5224
5244
|
* minimumCoverage was not set in the request.
|
|
@@ -5230,12 +5250,12 @@ export declare interface SuggestDocumentsResult<T> {
|
|
|
5230
5250
|
/**
|
|
5231
5251
|
* Options for retrieving suggestions based on the searchText.
|
|
5232
5252
|
*/
|
|
5233
|
-
export declare type SuggestOptions<
|
|
5253
|
+
export declare type SuggestOptions<TFields> = OperationOptions & SuggestRequest<TFields>;
|
|
5234
5254
|
|
|
5235
5255
|
/**
|
|
5236
5256
|
* Parameters for filtering, sorting, fuzzy matching, and other suggestions query behaviors.
|
|
5237
5257
|
*/
|
|
5238
|
-
export declare interface SuggestRequest<
|
|
5258
|
+
export declare interface SuggestRequest<TFields> {
|
|
5239
5259
|
/**
|
|
5240
5260
|
* An OData expression that filters the documents considered for suggestions.
|
|
5241
5261
|
*/
|
|
@@ -5278,12 +5298,12 @@ export declare interface SuggestRequest<Fields> {
|
|
|
5278
5298
|
* The comma-separated list of field names to search for the specified search text. Target fields
|
|
5279
5299
|
* must be included in the specified suggester.
|
|
5280
5300
|
*/
|
|
5281
|
-
searchFields?:
|
|
5301
|
+
searchFields?: TFields[] | string[];
|
|
5282
5302
|
/**
|
|
5283
5303
|
* The list of fields to retrieve. If unspecified, only the key field will be
|
|
5284
5304
|
* included in the results.
|
|
5285
5305
|
*/
|
|
5286
|
-
select?:
|
|
5306
|
+
select?: TFields[] | string[];
|
|
5287
5307
|
/**
|
|
5288
5308
|
* The number of suggestions to retrieve. This must be a value between 1 and 100. The default is
|
|
5289
5309
|
* 5.
|
|
@@ -5294,13 +5314,13 @@ export declare interface SuggestRequest<Fields> {
|
|
|
5294
5314
|
/**
|
|
5295
5315
|
* A result containing a document found by a suggestion query, plus associated metadata.
|
|
5296
5316
|
*/
|
|
5297
|
-
export declare type SuggestResult<
|
|
5317
|
+
export declare type SuggestResult<TModel> = {
|
|
5298
5318
|
/**
|
|
5299
5319
|
* The text of the suggestion result.
|
|
5300
5320
|
* **NOTE: This property will not be serialized. It can only be populated by the server.**
|
|
5301
5321
|
*/
|
|
5302
5322
|
readonly text: string;
|
|
5303
|
-
document:
|
|
5323
|
+
document: TModel;
|
|
5304
5324
|
};
|
|
5305
5325
|
|
|
5306
5326
|
/**
|
|
@@ -5472,39 +5492,39 @@ export declare type TokenFilter = AsciiFoldingTokenFilter | CjkBigramTokenFilter
|
|
|
5472
5492
|
* {@link KnownTokenFilterName} can be used interchangeably with TokenFilterName,
|
|
5473
5493
|
* this enum contains the known values that the service supports.
|
|
5474
5494
|
* ### Know values supported by the service
|
|
5475
|
-
* **arabic_normalization**: A token filter that applies the Arabic normalizer to normalize the orthography. See http
|
|
5476
|
-
* **apostrophe**: Strips all characters after an apostrophe (including the apostrophe itself). See http
|
|
5477
|
-
* **asciifolding**: Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if such equivalents exist. See http
|
|
5478
|
-
* **cjk_bigram**: Forms bigrams of CJK terms that are generated from the standard tokenizer. See http
|
|
5479
|
-
* **cjk_width**: Normalizes CJK width differences. Folds fullwidth ASCII variants into the equivalent basic Latin, and half-width Katakana variants into the equivalent Kana. See http
|
|
5480
|
-
* **classic**: Removes English possessives, and dots from acronyms. See http
|
|
5481
|
-
* **common_grams**: Construct bigrams for frequently occurring terms while indexing. Single terms are still indexed too, with bigrams overlaid. See http
|
|
5482
|
-
* **edgeNGram_v2**: Generates n-grams of the given size(s) starting from the front or the back of an input token. See http
|
|
5483
|
-
* **elision**: Removes elisions. For example, "l'avion" (the plane) will be converted to "avion" (plane). See http
|
|
5484
|
-
* **german_normalization**: Normalizes German characters according to the heuristics of the German2 snowball algorithm. See http
|
|
5485
|
-
* **hindi_normalization**: Normalizes text in Hindi to remove some differences in spelling variations. See http
|
|
5486
|
-
* **indic_normalization**: Normalizes the Unicode representation of text in Indian languages. See http
|
|
5487
|
-
* **keyword_repeat**: Emits each incoming token twice, once as keyword and once as non-keyword. See http
|
|
5488
|
-
* **kstem**: A high-performance kstem filter for English. See http
|
|
5489
|
-
* **length**: Removes words that are too long or too short. See http
|
|
5490
|
-
* **limit**: Limits the number of tokens while indexing. See http
|
|
5491
|
-
* **lowercase**: Normalizes token text to lower case. See http
|
|
5492
|
-
* **nGram_v2**: Generates n-grams of the given size(s). See http
|
|
5493
|
-
* **persian_normalization**: Applies normalization for Persian. See http
|
|
5494
|
-
* **phonetic**: Create tokens for phonetic matches. See https
|
|
5495
|
-
* **porter_stem**: Uses the Porter stemming algorithm to transform the token stream. See http
|
|
5496
|
-
* **reverse**: Reverses the token string. See http
|
|
5497
|
-
* **scandinavian_normalization**: Normalizes use of the interchangeable Scandinavian characters. See http
|
|
5498
|
-
* **scandinavian_folding**: Folds Scandinavian characters åÅäæÄÆ->a and öÖøØ->o. It also discriminates against use of double vowels aa, ae, ao, oe and oo, leaving just the first one. See http
|
|
5499
|
-
* **shingle**: Creates combinations of tokens as a single token. See http
|
|
5500
|
-
* **snowball**: A filter that stems words using a Snowball-generated stemmer. See http
|
|
5501
|
-
* **sorani_normalization**: Normalizes the Unicode representation of Sorani text. See http
|
|
5502
|
-
* **stemmer**: Language specific stemming filter. See https
|
|
5503
|
-
* **stopwords**: Removes stop words from a token stream. See http
|
|
5504
|
-
* **trim**: Trims leading and trailing whitespace from tokens. See http
|
|
5505
|
-
* **truncate**: Truncates the terms to a specific length. See http
|
|
5506
|
-
* **unique**: Filters out tokens with same text as the previous token. See http
|
|
5507
|
-
* **uppercase**: Normalizes token text to upper case. See http
|
|
5495
|
+
* **arabic_normalization**: A token filter that applies the Arabic normalizer to normalize the orthography. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/ar\/ArabicNormalizationFilter.html \
|
|
5496
|
+
* **apostrophe**: Strips all characters after an apostrophe (including the apostrophe itself). See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/tr\/ApostropheFilter.html \
|
|
5497
|
+
* **asciifolding**: Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if such equivalents exist. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/miscellaneous\/ASCIIFoldingFilter.html \
|
|
5498
|
+
* **cjk_bigram**: Forms bigrams of CJK terms that are generated from the standard tokenizer. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/cjk\/CJKBigramFilter.html \
|
|
5499
|
+
* **cjk_width**: Normalizes CJK width differences. Folds fullwidth ASCII variants into the equivalent basic Latin, and half-width Katakana variants into the equivalent Kana. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/cjk\/CJKWidthFilter.html \
|
|
5500
|
+
* **classic**: Removes English possessives, and dots from acronyms. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/standard\/ClassicFilter.html \
|
|
5501
|
+
* **common_grams**: Construct bigrams for frequently occurring terms while indexing. Single terms are still indexed too, with bigrams overlaid. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/commongrams\/CommonGramsFilter.html \
|
|
5502
|
+
* **edgeNGram_v2**: Generates n-grams of the given size(s) starting from the front or the back of an input token. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/ngram\/EdgeNGramTokenFilter.html \
|
|
5503
|
+
* **elision**: Removes elisions. For example, "l'avion" (the plane) will be converted to "avion" (plane). See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/util\/ElisionFilter.html \
|
|
5504
|
+
* **german_normalization**: Normalizes German characters according to the heuristics of the German2 snowball algorithm. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/de\/GermanNormalizationFilter.html \
|
|
5505
|
+
* **hindi_normalization**: Normalizes text in Hindi to remove some differences in spelling variations. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/hi\/HindiNormalizationFilter.html \
|
|
5506
|
+
* **indic_normalization**: Normalizes the Unicode representation of text in Indian languages. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/in\/IndicNormalizationFilter.html \
|
|
5507
|
+
* **keyword_repeat**: Emits each incoming token twice, once as keyword and once as non-keyword. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/miscellaneous\/KeywordRepeatFilter.html \
|
|
5508
|
+
* **kstem**: A high-performance kstem filter for English. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/en\/KStemFilter.html \
|
|
5509
|
+
* **length**: Removes words that are too long or too short. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/miscellaneous\/LengthFilter.html \
|
|
5510
|
+
* **limit**: Limits the number of tokens while indexing. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/miscellaneous\/LimitTokenCountFilter.html \
|
|
5511
|
+
* **lowercase**: Normalizes token text to lower case. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/core\/LowerCaseFilter.htm \
|
|
5512
|
+
* **nGram_v2**: Generates n-grams of the given size(s). See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/ngram\/NGramTokenFilter.html \
|
|
5513
|
+
* **persian_normalization**: Applies normalization for Persian. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/fa\/PersianNormalizationFilter.html \
|
|
5514
|
+
* **phonetic**: Create tokens for phonetic matches. See https:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-phonetic\/org\/apache\/lucene\/analysis\/phonetic\/package-tree.html \
|
|
5515
|
+
* **porter_stem**: Uses the Porter stemming algorithm to transform the token stream. See http:\/\/tartarus.org\/~martin\/PorterStemmer \
|
|
5516
|
+
* **reverse**: Reverses the token string. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/reverse\/ReverseStringFilter.html \
|
|
5517
|
+
* **scandinavian_normalization**: Normalizes use of the interchangeable Scandinavian characters. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/miscellaneous\/ScandinavianNormalizationFilter.html \
|
|
5518
|
+
* **scandinavian_folding**: Folds Scandinavian characters åÅäæÄÆ->a and öÖøØ->o. It also discriminates against use of double vowels aa, ae, ao, oe and oo, leaving just the first one. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/miscellaneous\/ScandinavianFoldingFilter.html \
|
|
5519
|
+
* **shingle**: Creates combinations of tokens as a single token. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/shingle\/ShingleFilter.html \
|
|
5520
|
+
* **snowball**: A filter that stems words using a Snowball-generated stemmer. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/snowball\/SnowballFilter.html \
|
|
5521
|
+
* **sorani_normalization**: Normalizes the Unicode representation of Sorani text. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/ckb\/SoraniNormalizationFilter.html \
|
|
5522
|
+
* **stemmer**: Language specific stemming filter. See https:\/\/docs.microsoft.com\/rest\/api\/searchservice\/Custom-analyzers-in-Azure-Search#TokenFilters \
|
|
5523
|
+
* **stopwords**: Removes stop words from a token stream. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/core\/StopFilter.html \
|
|
5524
|
+
* **trim**: Trims leading and trailing whitespace from tokens. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/miscellaneous\/TrimFilter.html \
|
|
5525
|
+
* **truncate**: Truncates the terms to a specific length. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/miscellaneous\/TruncateTokenFilter.html \
|
|
5526
|
+
* **unique**: Filters out tokens with same text as the previous token. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/miscellaneous\/RemoveDuplicatesTokenFilter.html \
|
|
5527
|
+
* **uppercase**: Normalizes token text to upper case. See http:\/\/lucene.apache.org\/core\/4_10_3\/analyzers-common\/org\/apache\/lucene\/analysis\/core\/UpperCaseFilter.html \
|
|
5508
5528
|
* **word_delimiter**: Splits words into subwords and performs optional transformations on subword groups.
|
|
5509
5529
|
*/
|
|
5510
5530
|
export declare type TokenFilterName = string;
|