Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit bfb5ab8

Browse files
authored
Disallow schemaOverrides in * configuration (#953)
Disallow `schemaOverrides` in configuration of `*` index, since that functionality does not work correctly right now. Note that in the future we might lift this restriction (if we fix the implementation). Documentation of this limitation will be included in #950.
1 parent d6efff5 commit bfb5ab8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

quesma/quesma/config/config_v2.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,9 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
574574
conf.CreateCommonTable = true
575575
conf.UseCommonTableForWildcard = true
576576
}
577+
if defaultConfig.SchemaOverrides != nil {
578+
errAcc = multierror.Append(errAcc, fmt.Errorf("schema overrides of default index ('%s') are not currently supported (only supported in configuration of a specific index)", DefaultWildcardIndexName))
579+
}
577580
if len(defaultConfig.QueryTarget) > 1 {
578581
errAcc = multierror.Append(errAcc, fmt.Errorf("the target configuration of default index ('%s') of query processor is not currently supported", DefaultWildcardIndexName))
579582
}
@@ -659,6 +662,9 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
659662
conf.UseCommonTableForWildcard = val == "true"
660663
}
661664
}
665+
if defaultConfig.SchemaOverrides != nil {
666+
errAcc = multierror.Append(errAcc, fmt.Errorf("schema overrides of default index ('%s') are not currently supported (only supported in configuration of a specific index)", DefaultWildcardIndexName))
667+
}
662668
if defaultConfig.UseCommonTable {
663669
// We set both flags to true here
664670
// as creating common table depends on the first one
@@ -682,6 +688,9 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
682688
conf.UseCommonTableForWildcard = val == "true"
683689
}
684690
}
691+
if ingestProcessorDefaultIndexConfig.SchemaOverrides != nil {
692+
errAcc = multierror.Append(errAcc, fmt.Errorf("schema overrides of default index ('%s') are not currently supported (only supported in configuration of a specific index)", DefaultWildcardIndexName))
693+
}
685694
if ingestProcessorDefaultIndexConfig.UseCommonTable {
686695
// We set both flags to true here
687696
// as creating common table depends on the first one

0 commit comments

Comments
 (0)