| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 3 | | // license information. |
| | 4 | |
|
| | 5 | | namespace Microsoft.Azure.Search.Models |
| | 6 | | { |
| | 7 | | using System; |
| | 8 | | using System.Collections.Generic; |
| | 9 | | using Newtonsoft.Json; |
| | 10 | |
|
| | 11 | | /// <summary> |
| | 12 | | /// Represents parameters for indexer execution. |
| | 13 | | /// </summary> |
| | 14 | | public class IndexingParameters |
| | 15 | | { |
| | 16 | | /// <summary> |
| | 17 | | /// Initializes a new instance of the IndexingParameters class. |
| | 18 | | /// </summary> |
| 96 | 19 | | public IndexingParameters() { } |
| | 20 | |
|
| | 21 | | /// <summary> |
| | 22 | | /// Initializes a new instance of the IndexingParameters class. |
| | 23 | | /// </summary> |
| 0 | 24 | | public IndexingParameters(int? batchSize = default(int?), int? maxFailedItems = default(int?), int? maxFailedIte |
| | 25 | | { |
| 0 | 26 | | BatchSize = batchSize; |
| 0 | 27 | | MaxFailedItems = maxFailedItems; |
| 0 | 28 | | MaxFailedItemsPerBatch = maxFailedItemsPerBatch; |
| 0 | 29 | | Configuration = configuration; |
| 0 | 30 | | } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Gets or sets the number of items that are read from the data |
| | 34 | | /// source and indexed as a single batch in order to improve |
| | 35 | | /// performance. The default depends on the data source type. |
| | 36 | | /// </summary> |
| | 37 | | [JsonProperty(PropertyName = "batchSize")] |
| 16 | 38 | | public int? BatchSize { get; set; } |
| | 39 | |
|
| | 40 | | /// <summary> |
| | 41 | | /// Gets or sets the maximum number of items that can fail indexing |
| | 42 | | /// for indexer execution to still be considered successful. -1 means |
| | 43 | | /// no limit. Default is 0. |
| | 44 | | /// </summary> |
| | 45 | | [JsonProperty(PropertyName = "maxFailedItems")] |
| 16 | 46 | | public int? MaxFailedItems { get; set; } |
| | 47 | |
|
| | 48 | | /// <summary> |
| | 49 | | /// Gets or sets the maximum number of items in a single batch that |
| | 50 | | /// can fail indexing for the batch to still be considered |
| | 51 | | /// successful. -1 means no limit. Default is 0. |
| | 52 | | /// </summary> |
| | 53 | | [JsonProperty(PropertyName = "maxFailedItemsPerBatch")] |
| 16 | 54 | | public int? MaxFailedItemsPerBatch { get; set; } |
| | 55 | |
|
| | 56 | | /// <summary> |
| | 57 | | /// Gets or sets whether indexer will base64-encode all values that |
| | 58 | | /// are inserted into key field of the target index. This is needed |
| | 59 | | /// if keys can contain characters that are invalid in keys (such as |
| | 60 | | /// dot '.'). Default is false. |
| | 61 | | /// </summary> |
| | 62 | | [Obsolete("This property is obsolete. Please create a field mapping using 'FieldMapping.Base64Encode' instead.") |
| | 63 | | [JsonProperty(PropertyName = "base64EncodeKeys")] |
| 0 | 64 | | public bool? Base64EncodeKeys { get; set; } |
| | 65 | |
|
| | 66 | | /// <summary> |
| | 67 | | /// Gets or sets a dictionary of indexer-specific configuration |
| | 68 | | /// properties. Each name is the name of a specific property. Each |
| | 69 | | /// value must be of a primitive type. |
| | 70 | | /// </summary> |
| | 71 | | [JsonProperty(PropertyName = "configuration")] |
| 166 | 72 | | public IDictionary<string, object> Configuration { get; set; } |
| | 73 | |
|
| | 74 | | } |
| | 75 | | } |