|
1 | 1 | using System; |
2 | 2 | using System.Collections.Generic; |
3 | | -using System.Linq; |
4 | 3 | using Elasticsearch.Net; |
5 | 4 | using Newtonsoft.Json; |
6 | 5 |
|
7 | 6 | namespace Nest |
8 | | -{ |
| 7 | +{ |
| 8 | + public class UpdatableSettings |
| 9 | + { |
| 10 | + public const string NumberOfReplicas = "index.number_of_replicas"; |
| 11 | + public const string AutoExpandReplicas = "index.auto_expand_replicas"; |
| 12 | + public const string BlocksReadOnly = "index.blocks.read_only"; |
| 13 | + public const string BlocksRead = "index.blocks.read"; |
| 14 | + public const string BlocksWrite = "index.blocks.write"; |
| 15 | + public const string BlocksMetadata = "index.blocks.metadata"; |
| 16 | + public const string RefreshInterval = "index.refresh_interval"; |
| 17 | + public const string IndexConcurrency = "index.index_concurrency"; |
| 18 | + public const string Codec = "index.codec"; |
| 19 | + public const string CodecBloomLoad = "index.codec.bloom.load"; |
| 20 | + public const string FailOnMergeFailure = "index.fail_on_merge_failure"; |
| 21 | + public const string TranslogFlushTreshHoldOps = "index.translog.flush_threshold_ops"; |
| 22 | + public const string TranslogFlushThresholdSize = "index.translog.flush_threshold_size"; |
| 23 | + public const string TranslogFlushThresholdPeriod = "index.translog.flush_threshold_period"; |
| 24 | + public const string TranslogDisableFlush = "index.translog.disable_flush"; |
| 25 | + public const string CacheFilterMaxSize = "index.cache.filter.max_size"; |
| 26 | + public const string CacheFilterExpire = "index.cache.filter.expire"; |
| 27 | + public const string CacheQueryEnable = "index.cache.query.enable"; |
| 28 | + public const string GatewaySnapshotInterval = "index.gateway.snapshot_interval"; |
| 29 | + public const string RoutingAllocationInclude = "index.routing.allocation.include"; |
| 30 | + public const string RoutingAllocationExclude = "index.routing.allocation.exclude"; |
| 31 | + public const string RoutingAllocationRequire = "index.routing.allocation.require"; |
| 32 | + public const string RoutingAllocationEnable = "index.routing.allocation.enable"; |
| 33 | + public const string RoutingAllocationDisableAllication = "index.routing.allocation.disable_allocation"; |
| 34 | + public const string RoutingAllocationDisableNewAllocation = "index.routing.allocation.disable_new_allocation"; |
| 35 | + public const string RoutingAllocationDisableReplicaAllocation = "index.routing.allocation.disable_replica_allocation"; |
| 36 | + public const string RoutingAllocationTotalShardsPerNode = "index.routing.allocation.total_shards_per_node"; |
| 37 | + public const string RecoveryInitialShards = "index.recovery.initial_shards"; |
| 38 | + public const string GcDeletes = "index.gc_deletes"; |
| 39 | + public const string TtlDisablePurge = "index.ttl.disable_purge"; |
| 40 | + public const string TranslogFsType = "index.translog.fs.type"; |
| 41 | + public const string CompoundFormat = "index.compound_format"; |
| 42 | + public const string CompoundOnFlush = "index.compound_on_flush"; |
| 43 | + public const string WarmersEnabled = "index.warmer.enabled"; |
| 44 | + public const string Analysis = "analysis"; |
| 45 | + } |
| 46 | + |
9 | 47 | public interface IUpdateSettingsRequest : IIndexOptionalPath<UpdateSettingsRequestParameters> |
10 | 48 | { |
11 | | - [JsonProperty("index.number_of_replicas")] |
| 49 | + [JsonProperty(UpdatableSettings.NumberOfReplicas)] |
12 | 50 | int? NumberOfReplicas { get; set; } |
13 | 51 |
|
14 | | - [JsonProperty("index.auto_expand_replicas")] |
| 52 | + [JsonProperty(UpdatableSettings.AutoExpandReplicas)] |
15 | 53 | object AutoExpandReplicas { get; set; } |
16 | 54 |
|
17 | | - [JsonProperty("index.blocks.read_only")] |
| 55 | + [JsonProperty(UpdatableSettings.BlocksReadOnly)] |
18 | 56 | bool? BlocksReadOnly { get; set; } |
19 | 57 |
|
20 | | - [JsonProperty("index.blocks.read")] |
| 58 | + [JsonProperty(UpdatableSettings.BlocksRead)] |
21 | 59 | bool? BlocksRead { get; set; } |
22 | 60 |
|
23 | | - [JsonProperty("index.blocks.write")] |
| 61 | + [JsonProperty(UpdatableSettings.BlocksWrite)] |
24 | 62 | bool? BlocksWrite { get; set; } |
25 | 63 |
|
26 | | - [JsonProperty("index.blocks.metadata")] |
| 64 | + [JsonProperty(UpdatableSettings.BlocksMetadata)] |
27 | 65 | bool? BlocksMetadata { get; set; } |
28 | 66 |
|
29 | | - [JsonProperty("index.refresh_interval")] |
| 67 | + [JsonProperty(UpdatableSettings.RefreshInterval)] |
30 | 68 | string RefreshInterval { get; set; } |
31 | 69 |
|
32 | | - [JsonProperty("index.index_concurrency")] |
| 70 | + [JsonProperty(UpdatableSettings.IndexConcurrency)] |
33 | 71 | int? IndexConcurrency { get; set; } |
34 | 72 |
|
35 | | - [JsonProperty("index.codec")] |
| 73 | + [JsonProperty(UpdatableSettings.Codec)] |
36 | 74 | string Codec { get; set; } |
37 | 75 |
|
38 | | - [JsonProperty("index.codec.bloom.load")] |
| 76 | + [JsonProperty(UpdatableSettings.CodecBloomLoad)] |
39 | 77 | bool? CodecBloomLoad { get; set; } |
40 | 78 |
|
41 | | - [JsonProperty("index.fail_on_merge_failure")] |
| 79 | + [JsonProperty(UpdatableSettings.FailOnMergeFailure)] |
42 | 80 | bool? FailOnMergeFailure { get; set; } |
43 | 81 |
|
44 | | - [JsonProperty("index.translog.flush_threshold_ops")] |
| 82 | + [JsonProperty(UpdatableSettings.TranslogFlushTreshHoldOps)] |
45 | 83 | string TranslogFlushTreshHoldOps { get; set; } |
46 | 84 |
|
47 | | - [JsonProperty("index.translog.flush_threshold_size")] |
| 85 | + [JsonProperty(UpdatableSettings.TranslogFlushThresholdSize)] |
48 | 86 | string TranslogFlushThresholdSize { get; set; } |
49 | 87 |
|
50 | | - [JsonProperty("index.translog.flush_threshold_period")] |
| 88 | + [JsonProperty(UpdatableSettings.TranslogFlushThresholdPeriod)] |
51 | 89 | string TranslogFlushThresholdPeriod { get; set; } |
52 | 90 |
|
53 | | - [JsonProperty("index.translog.disable_flush")] |
| 91 | + [JsonProperty(UpdatableSettings.TranslogDisableFlush)] |
54 | 92 | bool? TranslogDisableFlush { get; set; } |
55 | 93 |
|
56 | | - [JsonProperty("index.cache.filter.max_size")] |
| 94 | + [JsonProperty(UpdatableSettings.CacheFilterMaxSize)] |
57 | 95 | string CacheFilterMaxSize { get; set; } |
58 | 96 |
|
59 | | - [JsonProperty("index.cache.filter.expire")] |
| 97 | + [JsonProperty(UpdatableSettings.CacheFilterExpire)] |
60 | 98 | string CacheFilterExpire { get; set; } |
61 | 99 |
|
62 | | - [JsonProperty("index.cache.query.enable")] |
| 100 | + [JsonProperty(UpdatableSettings.CacheQueryEnable)] |
63 | 101 | bool? CacheQueryEnable { get; set; } |
64 | 102 |
|
65 | | - [JsonProperty("index.gateway.snapshot_interval")] |
| 103 | + [JsonProperty(UpdatableSettings.GatewaySnapshotInterval)] |
66 | 104 | string GatewaySnapshotInterval { get; set; } |
67 | 105 |
|
68 | | - [JsonProperty("index.routing.allocation.include")] |
| 106 | + [JsonProperty(UpdatableSettings.RoutingAllocationInclude)] |
69 | 107 | IDictionary<string, object> RoutingAllocationInclude { get; set; } |
70 | 108 |
|
71 | | - [JsonProperty("index.routing.allocation.exclude")] |
| 109 | + [JsonProperty(UpdatableSettings.RoutingAllocationExclude)] |
72 | 110 | IDictionary<string, object> RoutingAllocationExclude { get; set; } |
73 | 111 |
|
74 | | - [JsonProperty("index.routing.allocation.require")] |
| 112 | + [JsonProperty(UpdatableSettings.RoutingAllocationRequire)] |
75 | 113 | IDictionary<string, object> RoutingAllocationRequire { get; set; } |
76 | 114 |
|
77 | | - [JsonProperty("index.routing.allocation.enable")] |
| 115 | + [JsonProperty(UpdatableSettings.RoutingAllocationEnable)] |
78 | 116 | RoutingAllocationEnableOption? RoutingAllocationEnable { get; set; } |
79 | 117 |
|
80 | | - [JsonProperty("index.routing.allocation.disable_allocation")] |
| 118 | + [JsonProperty(UpdatableSettings.RoutingAllocationDisableAllication)] |
81 | 119 | bool? RoutingAllocationDisableAllication { get; set; } |
82 | 120 |
|
83 | | - [JsonProperty("index.routing.allocation.disable_new_allocation")] |
| 121 | + [JsonProperty(UpdatableSettings.RoutingAllocationDisableNewAllocation)] |
84 | 122 | bool? RoutingAllocationDisableNewAllocation { get; set; } |
85 | 123 |
|
86 | | - [JsonProperty("index.routing.allocation.disable_replica_allocation")] |
| 124 | + [JsonProperty(UpdatableSettings.RoutingAllocationDisableReplicaAllocation)] |
87 | 125 | bool? RoutingAllocationDisableReplicaAllocation { get; set; } |
88 | 126 |
|
89 | | - [JsonProperty("index.routing.allocation.total_shards_per_node")] |
| 127 | + [JsonProperty(UpdatableSettings.RoutingAllocationTotalShardsPerNode)] |
90 | 128 | int? RoutingAllocationTotalShardsPerNode { get; set; } |
91 | 129 |
|
92 | | - [JsonProperty("index.recovery.initial_shards")] |
| 130 | + [JsonProperty(UpdatableSettings.RecoveryInitialShards)] |
93 | 131 | string RecoveryInitialShards { get; set; } |
94 | 132 |
|
95 | | - [JsonProperty("index.gc_deletes")] |
| 133 | + [JsonProperty(UpdatableSettings.GcDeletes)] |
96 | 134 | bool? GcDeletes { get; set; } |
97 | 135 |
|
98 | | - [JsonProperty("index.ttl.disable_purge")] |
| 136 | + [JsonProperty(UpdatableSettings.TtlDisablePurge)] |
99 | 137 | bool? TtlDisablePurge { get; set; } |
100 | 138 |
|
101 | | - [JsonProperty("index.translog.fs.type")] |
| 139 | + [JsonProperty(UpdatableSettings.TranslogFsType)] |
102 | 140 | string TranslogFsType { get; set; } |
103 | 141 |
|
104 | | - [JsonProperty("index.compound_format")] |
| 142 | + [JsonProperty(UpdatableSettings.CompoundFormat)] |
105 | 143 | bool? CompoundFormat { get; set; } |
106 | 144 |
|
107 | | - [JsonProperty("index.compound_on_flush")] |
| 145 | + [JsonProperty(UpdatableSettings.CompoundOnFlush)] |
108 | 146 | bool? CompoundOnFlush { get; set; } |
109 | 147 |
|
110 | | - [JsonProperty("index.warmer.enabled")] |
| 148 | + [JsonProperty(UpdatableSettings.WarmersEnabled)] |
111 | 149 | bool? WarmersEnabled { get; set; } |
112 | 150 |
|
113 | | - [JsonProperty("analysis")] |
| 151 | + [JsonProperty(UpdatableSettings.Analysis)] |
114 | 152 | AnalysisSettings Analysis { get; set; } |
115 | 153 | } |
116 | 154 |
|
|
0 commit comments