@@ -41,7 +41,11 @@ case class FlintMetadata(
41
41
*/
42
42
latestLogEntry : Option [FlintMetadataLogEntry ] = None ,
43
43
/** Optional Flint index settings. TODO: move elsewhere? */
44
- indexSettings : Option [String ]) {
44
+ indexSettings : Option [String ],
45
+ /** Optional Flint index mappings.*/
46
+ indexMappings : Option [String ],
47
+ /** Optional Flint index mappings _source field*/
48
+ indexMappingsSourceEnabled : Boolean ) {
45
49
46
50
require(version != null , " version is required" )
47
51
require(name != null , " name is required" )
@@ -69,6 +73,8 @@ object FlintMetadata {
69
73
private var latestId : Option [String ] = None
70
74
private var latestLogEntry : Option [FlintMetadataLogEntry ] = None
71
75
private var indexSettings : Option [String ] = None
76
+ private var indexMappings : Option [String ] = None
77
+ private var indexMappingsSourceEnabled = true
72
78
73
79
def version (version : FlintVersion ): this .type = {
74
80
this .version = version
@@ -131,6 +137,16 @@ object FlintMetadata {
131
137
this
132
138
}
133
139
140
+ def indexMappings (indexMappings : String ): this .type = {
141
+ this .indexMappings = Option (indexMappings)
142
+ this
143
+ }
144
+
145
+ def indexMappingsSourceEnabled (indexMappingsSourceEnabled : Boolean ): this .type = {
146
+ this .indexMappingsSourceEnabled = indexMappingsSourceEnabled
147
+ this
148
+ }
149
+
134
150
// Build method to create the FlintMetadata instance
135
151
def build (): FlintMetadata = {
136
152
FlintMetadata (
@@ -143,6 +159,8 @@ object FlintMetadata {
143
159
properties = properties,
144
160
schema = schema,
145
161
indexSettings = indexSettings,
162
+ indexMappings = indexMappings,
163
+ indexMappingsSourceEnabled = indexMappingsSourceEnabled,
146
164
latestId = latestId,
147
165
latestLogEntry = latestLogEntry)
148
166
}
0 commit comments