Skip to content

Commit

Permalink
Disallow schemaOverrides in * configuration (#953)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
avelanarius authored Nov 6, 2024
1 parent d6efff5 commit bfb5ab8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions quesma/quesma/config/config_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,9 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
conf.CreateCommonTable = true
conf.UseCommonTableForWildcard = true
}
if defaultConfig.SchemaOverrides != nil {
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))
}
if len(defaultConfig.QueryTarget) > 1 {
errAcc = multierror.Append(errAcc, fmt.Errorf("the target configuration of default index ('%s') of query processor is not currently supported", DefaultWildcardIndexName))
}
Expand Down Expand Up @@ -659,6 +662,9 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
conf.UseCommonTableForWildcard = val == "true"
}
}
if defaultConfig.SchemaOverrides != nil {
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))
}
if defaultConfig.UseCommonTable {
// We set both flags to true here
// as creating common table depends on the first one
Expand All @@ -682,6 +688,9 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
conf.UseCommonTableForWildcard = val == "true"
}
}
if ingestProcessorDefaultIndexConfig.SchemaOverrides != nil {
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))
}
if ingestProcessorDefaultIndexConfig.UseCommonTable {
// We set both flags to true here
// as creating common table depends on the first one
Expand Down

0 comments on commit bfb5ab8

Please sign in to comment.