-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
index.ts
4100 lines (3831 loc) · 201 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import * as coreClient from "@azure/core-client";
export type SearchIndexerDataIdentityUnion =
| SearchIndexerDataIdentity
| SearchIndexerDataNoneIdentity
| SearchIndexerDataUserAssignedIdentity;
export type DataChangeDetectionPolicyUnion =
| DataChangeDetectionPolicy
| HighWaterMarkChangeDetectionPolicy
| SqlIntegratedChangeTrackingPolicy;
export type DataDeletionDetectionPolicyUnion =
| DataDeletionDetectionPolicy
| SoftDeleteColumnDeletionDetectionPolicy;
export type SearchIndexerSkillUnion =
| SearchIndexerSkill
| ConditionalSkill
| KeyPhraseExtractionSkill
| OcrSkill
| ImageAnalysisSkill
| LanguageDetectionSkill
| ShaperSkill
| MergeSkill
| EntityRecognitionSkill
| SentimentSkill
| SentimentSkillV3
| EntityLinkingSkill
| EntityRecognitionSkillV3
| PIIDetectionSkill
| SplitSkill
| CustomEntityLookupSkill
| TextTranslationSkill
| DocumentExtractionSkill
| WebApiSkill;
export type CognitiveServicesAccountUnion =
| CognitiveServicesAccount
| DefaultCognitiveServicesAccount
| CognitiveServicesAccountKey;
export type ScoringFunctionUnion =
| ScoringFunction
| DistanceScoringFunction
| FreshnessScoringFunction
| MagnitudeScoringFunction
| TagScoringFunction;
export type LexicalAnalyzerUnion =
| LexicalAnalyzer
| CustomAnalyzer
| PatternAnalyzer
| LuceneStandardAnalyzer
| StopAnalyzer;
export type LexicalTokenizerUnion =
| LexicalTokenizer
| ClassicTokenizer
| EdgeNGramTokenizer
| KeywordTokenizer
| KeywordTokenizerV2
| MicrosoftLanguageTokenizer
| MicrosoftLanguageStemmingTokenizer
| NGramTokenizer
| PathHierarchyTokenizerV2
| PatternTokenizer
| LuceneStandardTokenizer
| LuceneStandardTokenizerV2
| UaxUrlEmailTokenizer;
export type TokenFilterUnion =
| TokenFilter
| AsciiFoldingTokenFilter
| CjkBigramTokenFilter
| CommonGramTokenFilter
| DictionaryDecompounderTokenFilter
| EdgeNGramTokenFilter
| EdgeNGramTokenFilterV2
| ElisionTokenFilter
| KeepTokenFilter
| KeywordMarkerTokenFilter
| LengthTokenFilter
| LimitTokenFilter
| NGramTokenFilter
| NGramTokenFilterV2
| PatternCaptureTokenFilter
| PatternReplaceTokenFilter
| PhoneticTokenFilter
| ShingleTokenFilter
| SnowballTokenFilter
| StemmerTokenFilter
| StemmerOverrideTokenFilter
| StopwordsTokenFilter
| SynonymTokenFilter
| TruncateTokenFilter
| UniqueTokenFilter
| WordDelimiterTokenFilter;
export type CharFilterUnion =
| CharFilter
| MappingCharFilter
| PatternReplaceCharFilter;
export type LexicalNormalizerUnion = LexicalNormalizer | CustomNormalizer;
export type SimilarityUnion = Similarity | ClassicSimilarity | BM25Similarity;
/** Represents a datasource definition, which can be used to configure an indexer. */
export interface SearchIndexerDataSource {
/** The name of the datasource. */
name: string;
/** The description of the datasource. */
description?: string;
/** The type of the datasource. */
type: SearchIndexerDataSourceType;
/** Credentials for the datasource. */
credentials: DataSourceCredentials;
/** The data container for the datasource. */
container: SearchIndexerDataContainer;
/** An explicit managed identity to use for this datasource. If not specified and the connection string is a managed identity, the system-assigned managed identity is used. If not specified, the value remains unchanged. If "none" is specified, the value of this property is cleared. */
identity?: SearchIndexerDataIdentityUnion;
/** The data change detection policy for the datasource. */
dataChangeDetectionPolicy?: DataChangeDetectionPolicyUnion;
/** The data deletion detection policy for the datasource. */
dataDeletionDetectionPolicy?: DataDeletionDetectionPolicyUnion;
/** The ETag of the data source. */
etag?: string;
/** A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your datasource definition when you want full assurance that no one, not even Microsoft, can decrypt your data source definition in Azure Cognitive Search. Once you have encrypted your data source definition, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your datasource definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. */
encryptionKey?: SearchResourceEncryptionKey;
}
/** Represents credentials that can be used to connect to a datasource. */
export interface DataSourceCredentials {
/** The connection string for the datasource. Set to '<unchanged>' if you do not want the connection string updated. */
connectionString?: string;
}
/** Represents information about the entity (such as Azure SQL table or CosmosDB collection) that will be indexed. */
export interface SearchIndexerDataContainer {
/** The name of the table or view (for Azure SQL data source) or collection (for CosmosDB data source) that will be indexed. */
name: string;
/** A query that is applied to this data container. The syntax and meaning of this parameter is datasource-specific. Not supported by Azure SQL datasources. */
query?: string;
}
/** Abstract base type for data identities. */
export interface SearchIndexerDataIdentity {
/** Polymorphic discriminator, which specifies the different types this object can be */
odatatype:
| "#Microsoft.Azure.Search.SearchIndexerDataNoneIdentity"
| "#Microsoft.Azure.Search.SearchIndexerDataUserAssignedIdentity";
}
/** Base type for data change detection policies. */
export interface DataChangeDetectionPolicy {
/** Polymorphic discriminator, which specifies the different types this object can be */
odatatype:
| "#Microsoft.Azure.Search.HighWaterMarkChangeDetectionPolicy"
| "#Microsoft.Azure.Search.SqlIntegratedChangeTrackingPolicy";
}
/** Base type for data deletion detection policies. */
export interface DataDeletionDetectionPolicy {
/** Polymorphic discriminator, which specifies the different types this object can be */
odatatype: "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy";
}
/** A customer-managed encryption key in Azure Key Vault. Keys that you create and manage can be used to encrypt or decrypt data-at-rest in Azure Cognitive Search, such as indexes and synonym maps. */
export interface SearchResourceEncryptionKey {
/** The name of your Azure Key Vault key to be used to encrypt your data at rest. */
keyName: string;
/** The version of your Azure Key Vault key to be used to encrypt your data at rest. */
keyVersion: string;
/** The URI of your Azure Key Vault, also referred to as DNS name, that contains the key to be used to encrypt your data at rest. An example URI might be https://my-keyvault-name.vault.azure.net. */
vaultUri: string;
/** Optional Azure Active Directory credentials used for accessing your Azure Key Vault. Not required if using managed identity instead. */
accessCredentials?: AzureActiveDirectoryApplicationCredentials;
/** An explicit managed identity to use for this encryption key. If not specified and the access credentials property is null, the system-assigned managed identity is used. On update to the resource, if the explicit identity is unspecified, it remains unchanged. If "none" is specified, the value of this property is cleared. */
identity?: SearchIndexerDataIdentityUnion;
}
/** Credentials of a registered application created for your search service, used for authenticated access to the encryption keys stored in Azure Key Vault. */
export interface AzureActiveDirectoryApplicationCredentials {
/** An AAD Application ID that was granted the required access permissions to the Azure Key Vault that is to be used when encrypting your data at rest. The Application ID should not be confused with the Object ID for your AAD Application. */
applicationId: string;
/** The authentication key of the specified AAD application. */
applicationSecret?: string;
}
/** Describes an error condition for the Azure Cognitive Search API. */
export interface SearchError {
/**
* One of a server-defined set of error codes.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly code?: string;
/**
* A human-readable representation of the error.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly message: string;
/**
* An array of details about specific errors that led to this reported error.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly details?: SearchError[];
}
/** Response from a List Datasources request. If successful, it includes the full definitions of all datasources. */
export interface ListDataSourcesResult {
/**
* The datasources in the Search service.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly dataSources: SearchIndexerDataSource[];
}
export interface DocumentKeysOrIds {
/** document keys to be reset */
documentKeys?: string[];
/** datasource document identifiers to be reset */
datasourceDocumentIds?: string[];
}
/** Represents an indexer. */
export interface SearchIndexer {
/** The name of the indexer. */
name: string;
/** The description of the indexer. */
description?: string;
/** The name of the datasource from which this indexer reads data. */
dataSourceName: string;
/** The name of the skillset executing with this indexer. */
skillsetName?: string;
/** The name of the index to which this indexer writes data. */
targetIndexName: string;
/** The schedule for this indexer. */
schedule?: IndexingSchedule;
/** Parameters for indexer execution. */
parameters?: IndexingParameters;
/** Defines mappings between fields in the data source and corresponding target fields in the index. */
fieldMappings?: FieldMapping[];
/** Output field mappings are applied after enrichment and immediately before indexing. */
outputFieldMappings?: FieldMapping[];
/** A value indicating whether the indexer is disabled. Default is false. */
isDisabled?: boolean;
/** The ETag of the indexer. */
etag?: string;
/** A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your indexer definition (as well as indexer execution status) when you want full assurance that no one, not even Microsoft, can decrypt them in Azure Cognitive Search. Once you have encrypted your indexer definition, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your indexer definition (and indexer execution status) will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. */
encryptionKey?: SearchResourceEncryptionKey;
/** Adds caching to an enrichment pipeline to allow for incremental modification steps without having to rebuild the index every time. */
cache?: SearchIndexerCache;
}
/** Represents a schedule for indexer execution. */
export interface IndexingSchedule {
/** The interval of time between indexer executions. */
interval: string;
/** The time when an indexer should start running. */
startTime?: Date;
}
/** Represents parameters for indexer execution. */
export interface IndexingParameters {
/** The number of items that are read from the data source and indexed as a single batch in order to improve performance. The default depends on the data source type. */
batchSize?: number;
/** The maximum number of items that can fail indexing for indexer execution to still be considered successful. -1 means no limit. Default is 0. */
maxFailedItems?: number;
/** The maximum number of items in a single batch that can fail indexing for the batch to still be considered successful. -1 means no limit. Default is 0. */
maxFailedItemsPerBatch?: number;
/** A dictionary of indexer-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. */
configuration?: IndexingParametersConfiguration;
}
/** A dictionary of indexer-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. */
export interface IndexingParametersConfiguration {
/** Describes unknown properties. The value of an unknown property can be of "any" type. */
[property: string]: any;
/** Represents the parsing mode for indexing from an Azure blob data source. */
parsingMode?: BlobIndexerParsingMode;
/** Comma-delimited list of filename extensions to ignore when processing from Azure blob storage. For example, you could exclude ".png, .mp4" to skip over those files during indexing. */
excludedFileNameExtensions?: string;
/** Comma-delimited list of filename extensions to select when processing from Azure blob storage. For example, you could focus indexing on specific application files ".docx, .pptx, .msg" to specifically include those file types. */
indexedFileNameExtensions?: string;
/** For Azure blobs, set to false if you want to continue indexing when an unsupported content type is encountered, and you don't know all the content types (file extensions) in advance. */
failOnUnsupportedContentType?: boolean;
/** For Azure blobs, set to false if you want to continue indexing if a document fails indexing. */
failOnUnprocessableDocument?: boolean;
/** For Azure blobs, set this property to true to still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors by default. For limits on blob size, see https://docs.microsoft.com/azure/search/search-limits-quotas-capacity. */
indexStorageMetadataOnlyForOversizedDocuments?: boolean;
/** For CSV blobs, specifies a comma-delimited list of column headers, useful for mapping source fields to destination fields in an index. */
delimitedTextHeaders?: string;
/** For CSV blobs, specifies the end-of-line single-character delimiter for CSV files where each line starts a new document (for example, "|"). */
delimitedTextDelimiter?: string;
/** For CSV blobs, indicates that the first (non-blank) line of each blob contains headers. */
firstLineContainsHeaders?: boolean;
/** For JSON arrays, given a structured or semi-structured document, you can specify a path to the array using this property. */
documentRoot?: string;
/** Specifies the data to extract from Azure blob storage and tells the indexer which data to extract from image content when "imageAction" is set to a value other than "none". This applies to embedded image content in a .PDF or other application, or image files such as .jpg and .png, in Azure blobs. */
dataToExtract?: BlobIndexerDataToExtract;
/** Determines how to process embedded images and image files in Azure blob storage. Setting the "imageAction" configuration to any value other than "none" requires that a skillset also be attached to that indexer. */
imageAction?: BlobIndexerImageAction;
/** If true, will create a path //document//file_data that is an object representing the original file data downloaded from your blob data source. This allows you to pass the original file data to a custom skill for processing within the enrichment pipeline, or to the Document Extraction skill. */
allowSkillsetToReadFileData?: boolean;
/** Determines algorithm for text extraction from PDF files in Azure blob storage. */
pdfTextRotationAlgorithm?: BlobIndexerPDFTextRotationAlgorithm;
/** Specifies the environment in which the indexer should execute. */
executionEnvironment?: IndexerExecutionEnvironment;
/** Increases the timeout beyond the 5-minute default for Azure SQL database data sources, specified in the format "hh:mm:ss". */
queryTimeout?: string;
}
/** Defines a mapping between a field in a data source and a target field in an index. */
export interface FieldMapping {
/** The name of the field in the data source. */
sourceFieldName: string;
/** The name of the target field in the index. Same as the source field name by default. */
targetFieldName?: string;
/** A function to apply to each source field value before indexing. */
mappingFunction?: FieldMappingFunction;
}
/** Represents a function that transforms a value from a data source before indexing. */
export interface FieldMappingFunction {
/** The name of the field mapping function. */
name: string;
/** A dictionary of parameter name/value pairs to pass to the function. Each value must be of a primitive type. */
parameters?: { [propertyName: string]: Record<string, unknown> };
}
export interface SearchIndexerCache {
/** The connection string to the storage account where the cache data will be persisted. */
storageConnectionString?: string;
/** Specifies whether incremental reprocessing is enabled. */
enableReprocessing?: boolean;
}
/** Response from a List Indexers request. If successful, it includes the full definitions of all indexers. */
export interface ListIndexersResult {
/**
* The indexers in the Search service.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly indexers: SearchIndexer[];
}
/** Represents the current status and execution history of an indexer. */
export interface SearchIndexerStatus {
/**
* Overall indexer status.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly status: IndexerStatus;
/**
* The result of the most recent or an in-progress indexer execution.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly lastResult?: IndexerExecutionResult;
/**
* History of the recent indexer executions, sorted in reverse chronological order.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly executionHistory: IndexerExecutionResult[];
/**
* The execution limits for the indexer.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly limits: SearchIndexerLimits;
}
/** Represents the result of an individual indexer execution. */
export interface IndexerExecutionResult {
/**
* The outcome of this indexer execution.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly status: IndexerExecutionStatus;
/**
* The outcome of this indexer execution.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly statusDetail?: IndexerExecutionStatusDetail;
/**
* All of the state that defines and dictates the indexer's current execution.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly currentState?: IndexerState;
/**
* The error message indicating the top-level error, if any.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly errorMessage?: string;
/**
* The start time of this indexer execution.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly startTime?: Date;
/**
* The end time of this indexer execution, if the execution has already completed.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly endTime?: Date;
/**
* The item-level indexing errors.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly errors: SearchIndexerError[];
/**
* The item-level indexing warnings.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly warnings: SearchIndexerWarning[];
/**
* The number of items that were processed during this indexer execution. This includes both successfully processed items and items where indexing was attempted but failed.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly itemCount: number;
/**
* The number of items that failed to be indexed during this indexer execution.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly failedItemCount: number;
/**
* Change tracking state with which an indexer execution started.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly initialTrackingState?: string;
/**
* Change tracking state with which an indexer execution finished.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly finalTrackingState?: string;
}
/** Represents all of the state that defines and dictates the indexer's current execution. */
export interface IndexerState {
/**
* The mode the indexer is running in.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly mode?: IndexingMode;
/**
* Change tracking state used when indexing starts on all documents in the datasource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly allDocumentsInitialChangeTrackingState?: string;
/**
* Change tracking state value when indexing finishes on all documents in the datasource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly allDocumentsFinalChangeTrackingState?: string;
/**
* Change tracking state used when indexing starts on select, reset documents in the datasource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly resetDocumentsInitialChangeTrackingState?: string;
/**
* Change tracking state value when indexing finishes on select, reset documents in the datasource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly resetDocumentsFinalChangeTrackingState?: string;
/**
* The list of document keys that have been reset. The document key is the document's unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly resetDocumentKeys?: string[];
/**
* The list of datasource document ids that have been reset. The datasource document id is the unique identifier for the data in the datasource. The indexer will prioritize selectively re-ingesting these ids.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly resetDatasourceDocumentIds?: string[];
}
/** Represents an item- or document-level indexing error. */
export interface SearchIndexerError {
/**
* The key of the item for which indexing failed.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly key?: string;
/**
* The message describing the error that occurred while processing the item.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly errorMessage: string;
/**
* The status code indicating why the indexing operation failed. Possible values include: 400 for a malformed input document, 404 for document not found, 409 for a version conflict, 422 when the index is temporarily unavailable, or 503 for when the service is too busy.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly statusCode: number;
/**
* The name of the source at which the error originated. For example, this could refer to a particular skill in the attached skillset. This may not be always available.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
* Additional, verbose details about the error to assist in debugging the indexer. This may not be always available.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly details?: string;
/**
* A link to a troubleshooting guide for these classes of errors. This may not be always available.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly documentationLink?: string;
}
/** Represents an item-level warning. */
export interface SearchIndexerWarning {
/**
* The key of the item which generated a warning.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly key?: string;
/**
* The message describing the warning that occurred while processing the item.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly message: string;
/**
* The name of the source at which the warning originated. For example, this could refer to a particular skill in the attached skillset. This may not be always available.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
* Additional, verbose details about the warning to assist in debugging the indexer. This may not be always available.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly details?: string;
/**
* A link to a troubleshooting guide for these classes of warnings. This may not be always available.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly documentationLink?: string;
}
export interface SearchIndexerLimits {
/**
* The maximum duration that the indexer is permitted to run for one execution.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly maxRunTime?: string;
/**
* The maximum size of a document, in bytes, which will be considered valid for indexing.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly maxDocumentExtractionSize?: number;
/**
* The maximum number of characters that will be extracted from a document picked up for indexing.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly maxDocumentContentCharactersToExtract?: number;
}
/** A list of skills. */
export interface SearchIndexerSkillset {
/** The name of the skillset. */
name: string;
/** The description of the skillset. */
description?: string;
/** A list of skills in the skillset. */
skills: SearchIndexerSkillUnion[];
/** Details about cognitive services to be used when running skills. */
cognitiveServicesAccount?: CognitiveServicesAccountUnion;
/** Definition of additional projections to azure blob, table, or files, of enriched data. */
knowledgeStore?: SearchIndexerKnowledgeStore;
/** The ETag of the skillset. */
etag?: string;
/** A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your skillset definition when you want full assurance that no one, not even Microsoft, can decrypt your skillset definition in Azure Cognitive Search. Once you have encrypted your skillset definition, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your skillset definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. */
encryptionKey?: SearchResourceEncryptionKey;
}
/** Base type for skills. */
export interface SearchIndexerSkill {
/** Polymorphic discriminator, which specifies the different types this object can be */
odatatype:
| "#Microsoft.Skills.Util.ConditionalSkill"
| "#Microsoft.Skills.Text.KeyPhraseExtractionSkill"
| "#Microsoft.Skills.Vision.OcrSkill"
| "#Microsoft.Skills.Vision.ImageAnalysisSkill"
| "#Microsoft.Skills.Text.LanguageDetectionSkill"
| "#Microsoft.Skills.Util.ShaperSkill"
| "#Microsoft.Skills.Text.MergeSkill"
| "#Microsoft.Skills.Text.EntityRecognitionSkill"
| "#Microsoft.Skills.Text.SentimentSkill"
| "#Microsoft.Skills.Text.V3.SentimentSkill"
| "#Microsoft.Skills.Text.V3.EntityLinkingSkill"
| "#Microsoft.Skills.Text.V3.EntityRecognitionSkill"
| "#Microsoft.Skills.Text.PIIDetectionSkill"
| "#Microsoft.Skills.Text.SplitSkill"
| "#Microsoft.Skills.Text.CustomEntityLookupSkill"
| "#Microsoft.Skills.Text.TranslationSkill"
| "#Microsoft.Skills.Util.DocumentExtractionSkill"
| "#Microsoft.Skills.Custom.WebApiSkill";
/** The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. */
name?: string;
/** The description of the skill which describes the inputs, outputs, and usage of the skill. */
description?: string;
/** Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. */
context?: string;
/** Inputs of the skills could be a column in the source data set, or the output of an upstream skill. */
inputs: InputFieldMappingEntry[];
/** The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. */
outputs: OutputFieldMappingEntry[];
}
/** Input field mapping for a skill. */
export interface InputFieldMappingEntry {
/** The name of the input. */
name: string;
/** The source of the input. */
source?: string;
/** The source context used for selecting recursive inputs. */
sourceContext?: string;
/** The recursive inputs used when creating a complex type. */
inputs?: InputFieldMappingEntry[];
}
/** Output field mapping for a skill. */
export interface OutputFieldMappingEntry {
/** The name of the output defined by the skill. */
name: string;
/** The target name of the output. It is optional and default to name. */
targetName?: string;
}
/** Base type for describing any cognitive service resource attached to a skillset. */
export interface CognitiveServicesAccount {
/** Polymorphic discriminator, which specifies the different types this object can be */
odatatype:
| "#Microsoft.Azure.Search.DefaultCognitiveServices"
| "#Microsoft.Azure.Search.CognitiveServicesByKey";
/** Description of the cognitive service resource attached to a skillset. */
description?: string;
}
/** Definition of additional projections to azure blob, table, or files, of enriched data. */
export interface SearchIndexerKnowledgeStore {
/** The connection string to the storage account projections will be stored in. */
storageConnectionString: string;
/** A list of additional projections to perform during indexing. */
projections: SearchIndexerKnowledgeStoreProjection[];
}
/** Container object for various projection selectors. */
export interface SearchIndexerKnowledgeStoreProjection {
/** Projections to Azure Table storage. */
tables?: SearchIndexerKnowledgeStoreTableProjectionSelector[];
/** Projections to Azure Blob storage. */
objects?: SearchIndexerKnowledgeStoreObjectProjectionSelector[];
/** Projections to Azure File storage. */
files?: SearchIndexerKnowledgeStoreFileProjectionSelector[];
}
/** Abstract class to share properties between concrete selectors. */
export interface SearchIndexerKnowledgeStoreProjectionSelector {
/** Name of reference key to different projection. */
referenceKeyName?: string;
/** Name of generated key to store projection under. */
generatedKeyName?: string;
/** Source data to project. */
source?: string;
/** Source context for complex projections. */
sourceContext?: string;
/** Nested inputs for complex projections. */
inputs?: InputFieldMappingEntry[];
}
/** Response from a list skillset request. If successful, it includes the full definitions of all skillsets. */
export interface ListSkillsetsResult {
/**
* The skillsets defined in the Search service.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly skillsets: SearchIndexerSkillset[];
}
export interface SkillNames {
/** the names of skills to be reset. */
skillNames?: string[];
}
/** Represents a synonym map definition. */
export interface SynonymMap {
/** The name of the synonym map. */
name: string;
/** The format of the synonym map. Only the 'solr' format is currently supported. */
format: "solr";
/** A series of synonym rules in the specified synonym map format. The rules must be separated by newlines. */
synonyms: string;
/** A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. */
encryptionKey?: SearchResourceEncryptionKey;
/** The ETag of the synonym map. */
etag?: string;
}
/** Response from a List SynonymMaps request. If successful, it includes the full definitions of all synonym maps. */
export interface ListSynonymMapsResult {
/**
* The synonym maps in the Search service.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly synonymMaps: SynonymMap[];
}
/** Represents a search index definition, which describes the fields and search behavior of an index. */
export interface SearchIndex {
/** The name of the index. */
name: string;
/** The fields of the index. */
fields: SearchField[];
/** The scoring profiles for the index. */
scoringProfiles?: ScoringProfile[];
/** The name of the scoring profile to use if none is specified in the query. If this property is not set and no scoring profile is specified in the query, then default scoring (tf-idf) will be used. */
defaultScoringProfile?: string;
/** Options to control Cross-Origin Resource Sharing (CORS) for the index. */
corsOptions?: CorsOptions;
/** The suggesters for the index. */
suggesters?: Suggester[];
/** The analyzers for the index. */
analyzers?: LexicalAnalyzerUnion[];
/** The tokenizers for the index. */
tokenizers?: LexicalTokenizerUnion[];
/** The token filters for the index. */
tokenFilters?: TokenFilterUnion[];
/** The character filters for the index. */
charFilters?: CharFilterUnion[];
/** The normalizers for the index. */
normalizers?: LexicalNormalizerUnion[];
/** A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data in Azure Cognitive Search. Once you have encrypted your data, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. */
encryptionKey?: SearchResourceEncryptionKey;
/** The type of similarity algorithm to be used when scoring and ranking the documents matching a search query. The similarity algorithm can only be defined at index creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity algorithm is used. */
similarity?: SimilarityUnion;
/** Defines parameters for a search index that influence semantic capabilities. */
semanticSettings?: SemanticSettings;
/** The ETag of the index. */
etag?: string;
}
/** Represents a field in an index definition, which describes the name, data type, and search behavior of a field. */
export interface SearchField {
/** The name of the field, which must be unique within the fields collection of the index or parent field. */
name: string;
/** The data type of the field. */
type: SearchFieldDataType;
/** A value indicating whether the field uniquely identifies documents in the index. Exactly one top-level field in each index must be chosen as the key field and it must be of type Edm.String. Key fields can be used to look up documents directly and update or delete specific documents. Default is false for simple fields and null for complex fields. */
key?: boolean;
/** A value indicating whether the field can be returned in a search result. You can disable this option if you want to use a field (for example, margin) as a filter, sorting, or scoring mechanism but do not want the field to be visible to the end user. This property must be true for key fields, and it must be null for complex fields. This property can be changed on existing fields. Enabling this property does not cause any increase in index storage requirements. Default is true for simple fields and null for complex fields. */
retrievable?: boolean;
/** A value indicating whether the field is full-text searchable. This means it will undergo analysis such as word-breaking during indexing. If you set a searchable field to a value like "sunny day", internally it will be split into the individual tokens "sunny" and "day". This enables full-text searches for these terms. Fields of type Edm.String or Collection(Edm.String) are searchable by default. This property must be false for simple fields of other non-string data types, and it must be null for complex fields. Note: searchable fields consume extra space in your index since Azure Cognitive Search will store an additional tokenized version of the field value for full-text searches. If you want to save space in your index and you don't need a field to be included in searches, set searchable to false. */
searchable?: boolean;
/** A value indicating whether to enable the field to be referenced in $filter queries. filterable differs from searchable in how strings are handled. Fields of type Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are for exact matches only. For example, if you set such a field f to "sunny day", $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. This property must be null for complex fields. Default is true for simple fields and null for complex fields. */
filterable?: boolean;
/** A value indicating whether to enable the field to be referenced in $orderby expressions. By default Azure Cognitive Search sorts results by score, but in many experiences users will want to sort by fields in the documents. A simple field can be sortable only if it is single-valued (it has a single value in the scope of the parent document). Simple collection fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex collections are also multi-valued, and therefore cannot be sortable. This is true whether it's an immediate parent field, or an ancestor field, that's the complex collection. Complex fields cannot be sortable and the sortable property must be null for such fields. The default for sortable is true for single-valued simple fields, false for multi-valued simple fields, and null for complex fields. */
sortable?: boolean;
/** A value indicating whether to enable the field to be referenced in facet queries. Typically used in a presentation of search results that includes hit count by category (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple fields. */
facetable?: boolean;
/** The name of the analyzer to use for the field. This option can be used only with searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. */
analyzer?: LexicalAnalyzerName;
/** The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. This analyzer can be updated on an existing field. Must be null for complex fields. */
searchAnalyzer?: LexicalAnalyzerName;
/** The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. */
indexAnalyzer?: LexicalAnalyzerName;
/** The name of the normalizer to use for the field. This option can be used only with fields with filterable, sortable, or facetable enabled. Once the normalizer is chosen, it cannot be changed for the field. Must be null for complex fields. */
normalizer?: LexicalNormalizerName;
/** A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules in the synonym map. This attribute can be changed on existing fields. Must be null or an empty collection for complex fields. */
synonymMaps?: string[];
/** A list of sub-fields if this is a field of type Edm.ComplexType or Collection(Edm.ComplexType). Must be null or empty for simple fields. */
fields?: SearchField[];
}
/** Defines parameters for a search index that influence scoring in search queries. */
export interface ScoringProfile {
/** The name of the scoring profile. */
name: string;
/** Parameters that boost scoring based on text matches in certain index fields. */
textWeights?: TextWeights;
/** The collection of functions that influence the scoring of documents. */
functions?: ScoringFunctionUnion[];
/** A value indicating how the results of individual scoring functions should be combined. Defaults to "Sum". Ignored if there are no scoring functions. */
functionAggregation?: ScoringFunctionAggregation;
}
/** Defines weights on index fields for which matches should boost scoring in search queries. */
export interface TextWeights {
/** The dictionary of per-field weights to boost document scoring. The keys are field names and the values are the weights for each field. */
weights: { [propertyName: string]: number };
}
/** Base type for functions that can modify document scores during ranking. */
export interface ScoringFunction {
/** Polymorphic discriminator, which specifies the different types this object can be */
type: "distance" | "freshness" | "magnitude" | "tag";
/** The name of the field used as input to the scoring function. */
fieldName: string;
/** A multiplier for the raw score. Must be a positive number not equal to 1.0. */
boost: number;
/** A value indicating how boosting will be interpolated across document scores; defaults to "Linear". */
interpolation?: ScoringFunctionInterpolation;
}
/** Defines options to control Cross-Origin Resource Sharing (CORS) for an index. */
export interface CorsOptions {
/** The list of origins from which JavaScript code will be granted access to your index. Can contain a list of hosts of the form {protocol}://{fully-qualified-domain-name}[:{port#}], or a single '*' to allow all origins (not recommended). */
allowedOrigins: string[];
/** The duration for which browsers should cache CORS preflight responses. Defaults to 5 minutes. */
maxAgeInSeconds?: number;
}
/** Defines how the Suggest API should apply to a group of fields in the index. */
export interface Suggester {
/** The name of the suggester. */
name: string;
/** A value indicating the capabilities of the suggester. */
searchMode: "analyzingInfixMatching";
/** The list of field names to which the suggester applies. Each field must be searchable. */
sourceFields: string[];
}
/** Base type for analyzers. */
export interface LexicalAnalyzer {
/** Polymorphic discriminator, which specifies the different types this object can be */
odatatype:
| "#Microsoft.Azure.Search.CustomAnalyzer"
| "#Microsoft.Azure.Search.PatternAnalyzer"
| "#Microsoft.Azure.Search.StandardAnalyzer"
| "#Microsoft.Azure.Search.StopAnalyzer";
/** The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. */
name: string;
}
/** Base type for tokenizers. */
export interface LexicalTokenizer {
/** Polymorphic discriminator, which specifies the different types this object can be */
odatatype:
| "#Microsoft.Azure.Search.ClassicTokenizer"
| "#Microsoft.Azure.Search.EdgeNGramTokenizer"
| "#Microsoft.Azure.Search.KeywordTokenizer"
| "#Microsoft.Azure.Search.KeywordTokenizerV2"
| "#Microsoft.Azure.Search.MicrosoftLanguageTokenizer"
| "#Microsoft.Azure.Search.MicrosoftLanguageStemmingTokenizer"
| "#Microsoft.Azure.Search.NGramTokenizer"
| "#Microsoft.Azure.Search.PathHierarchyTokenizerV2"
| "#Microsoft.Azure.Search.PatternTokenizer"
| "#Microsoft.Azure.Search.StandardTokenizer"
| "#Microsoft.Azure.Search.StandardTokenizerV2"
| "#Microsoft.Azure.Search.UaxUrlEmailTokenizer";
/** The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. */
name: string;
}
/** Base type for token filters. */
export interface TokenFilter {
/** Polymorphic discriminator, which specifies the different types this object can be */
odatatype:
| "#Microsoft.Azure.Search.AsciiFoldingTokenFilter"
| "#Microsoft.Azure.Search.CjkBigramTokenFilter"
| "#Microsoft.Azure.Search.CommonGramTokenFilter"
| "#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter"
| "#Microsoft.Azure.Search.EdgeNGramTokenFilter"
| "#Microsoft.Azure.Search.EdgeNGramTokenFilterV2"
| "#Microsoft.Azure.Search.ElisionTokenFilter"
| "#Microsoft.Azure.Search.KeepTokenFilter"
| "#Microsoft.Azure.Search.KeywordMarkerTokenFilter"
| "#Microsoft.Azure.Search.LengthTokenFilter"
| "#Microsoft.Azure.Search.LimitTokenFilter"
| "#Microsoft.Azure.Search.NGramTokenFilter"
| "#Microsoft.Azure.Search.NGramTokenFilterV2"
| "#Microsoft.Azure.Search.PatternCaptureTokenFilter"
| "#Microsoft.Azure.Search.PatternReplaceTokenFilter"
| "#Microsoft.Azure.Search.PhoneticTokenFilter"
| "#Microsoft.Azure.Search.ShingleTokenFilter"
| "#Microsoft.Azure.Search.SnowballTokenFilter"
| "#Microsoft.Azure.Search.StemmerTokenFilter"
| "#Microsoft.Azure.Search.StemmerOverrideTokenFilter"
| "#Microsoft.Azure.Search.StopwordsTokenFilter"
| "#Microsoft.Azure.Search.SynonymTokenFilter"
| "#Microsoft.Azure.Search.TruncateTokenFilter"
| "#Microsoft.Azure.Search.UniqueTokenFilter"
| "#Microsoft.Azure.Search.WordDelimiterTokenFilter";
/** The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. */
name: string;
}
/** Base type for character filters. */
export interface CharFilter {
/** Polymorphic discriminator, which specifies the different types this object can be */
odatatype:
| "#Microsoft.Azure.Search.MappingCharFilter"
| "#Microsoft.Azure.Search.PatternReplaceCharFilter";
/** The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. */
name: string;
}
/** Base type for normalizers. */
export interface LexicalNormalizer {
/** Polymorphic discriminator, which specifies the different types this object can be */
odatatype: "#Microsoft.Azure.Search.CustomNormalizer";
/** The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. */
name: string;
}
/** Base type for similarity algorithms. Similarity algorithms are used to calculate scores that tie queries to documents. The higher the score, the more relevant the document is to that specific query. Those scores are used to rank the search results. */
export interface Similarity {
/** Polymorphic discriminator, which specifies the different types this object can be */
odatatype:
| "#Microsoft.Azure.Search.ClassicSimilarity"
| "#Microsoft.Azure.Search.BM25Similarity";
}
/** Defines parameters for a search index that influence semantic capabilities. */
export interface SemanticSettings {
/** The semantic configurations for the index. */
configurations?: SemanticConfiguration[];
}
/** Defines a specific configuration to be used in the context of semantic capabilities. */
export interface SemanticConfiguration {
/** The name of the semantic configuration. */
name: string;
/** Describes the title, content, and keyword fields to be used for semantic ranking, captions, highlights, and answers. At least one of the three sub properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. */
prioritizedFields: PrioritizedFields;
}
/** Describes the title, content, and keywords fields to be used for semantic ranking, captions, highlights, and answers. */
export interface PrioritizedFields {
/** Defines the title field to be used for semantic ranking, captions, highlights, and answers. If you don't have a title field in your index, leave this blank. */
titleField?: SemanticField;
/** Defines the content fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain text in natural language form. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long. */
prioritizedContentFields?: SemanticField[];
/** Defines the keyword fields to be used for semantic ranking, captions, highlights, and answers. For the best result, the selected fields should contain a list of keywords. The order of the fields in the array represents their priority. Fields with lower priority may get truncated if the content is long. */
prioritizedKeywordsFields?: SemanticField[];
}
/** A field that is used as part of the semantic configuration. */
export interface SemanticField {
name?: string;
}
/** Response from a List Indexes request. If successful, it includes the full definitions of all indexes. */
export interface ListIndexesResult {
/**
* The indexes in the Search service.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly indexes: SearchIndex[];
}
/** Statistics for a given index. Statistics are collected periodically and are not guaranteed to always be up-to-date. */
export interface GetIndexStatisticsResult {
/**
* The number of documents in the index.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly documentCount: number;
/**
* The amount of storage in bytes consumed by the index.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly storageSize: number;
}
/** Specifies some text and analysis components used to break that text into tokens. */
export interface AnalyzeRequest {
/** The text to break into tokens. */
text: string;
/** The name of the analyzer to use to break the given text. KnownAnalyzerNames is an enum containing known values. */
analyzer?: string;
/** The name of the tokenizer to use to break the given text. KnownTokenizerNames is an enum containing known values. */
tokenizer?: string;
/** The name of the normalizer to use to normalize the given text. */
normalizer?: LexicalNormalizerName;
/** An optional list of token filters to use when breaking the given text. */
tokenFilters?: string[];
/** An optional list of character filters to use when breaking the given text. */
charFilters?: string[];
}
/** The result of testing an analyzer on text. */
export interface AnalyzeResult {
/** The list of tokens returned by the analyzer specified in the request. */
tokens: AnalyzedTokenInfo[];
}
/** Information about a token returned by an analyzer. */
export interface AnalyzedTokenInfo {
/**
* The token returned by the analyzer.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly token: string;
/**
* The index of the first character of the token in the input text.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly startOffset: number;
/**
* The index of the last character of the token in the input text.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly endOffset: number;
/**