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

Commit 4fe5a7c

Browse files
Fix parsing the configuration (#827)
Signed-off-by: Piotr Grabowski <[email protected]> Co-authored-by: Piotr Grabowski <[email protected]>
1 parent d061b72 commit 4fe5a7c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

quesma/quesma/config/config_v2.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,11 +517,11 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
517517
processedConfig.QueryTarget = append(processedConfig.QueryTarget, ClickhouseTarget)
518518
}
519519

520-
if len(indexConfig.QueryTarget) == 2 && !(indexConfig.QueryTarget[0] == ClickhouseTarget && indexConfig.QueryTarget[1] == ElasticsearchTarget) {
520+
if len(processedConfig.QueryTarget) == 2 && !(processedConfig.QueryTarget[0] == ClickhouseTarget && processedConfig.QueryTarget[1] == ElasticsearchTarget) {
521521
errAcc = multierror.Append(errAcc, fmt.Errorf("index %s has invalid dual query target configuration - when you specify two targets, ClickHouse has to be the primary one and Elastic has to be the secondary one", indexName))
522522
continue
523523
}
524-
if len(indexConfig.QueryTarget) == 2 {
524+
if len(processedConfig.QueryTarget) == 2 {
525525
// Turn on A/B testing
526526
processedConfig.Optimizers = make(map[string]OptimizerConfiguration)
527527
processedConfig.Optimizers[ElasticABOptimizerName] = OptimizerConfiguration{
@@ -579,11 +579,11 @@ func (c *QuesmaNewConfiguration) TranslateToLegacyConfig() QuesmaConfiguration {
579579
processedConfig.QueryTarget = append(processedConfig.QueryTarget, ClickhouseTarget)
580580
}
581581

582-
if len(indexConfig.QueryTarget) == 2 && !(indexConfig.QueryTarget[0] == ClickhouseTarget && indexConfig.QueryTarget[1] == ElasticsearchTarget) {
582+
if len(processedConfig.QueryTarget) == 2 && !(processedConfig.QueryTarget[0] == ClickhouseTarget && processedConfig.QueryTarget[1] == ElasticsearchTarget) {
583583
errAcc = multierror.Append(errAcc, fmt.Errorf("index %s has invalid dual query target configuration - when you specify two targets, ClickHouse has to be the primary one and Elastic has to be the secondary one", indexName))
584584
continue
585585
}
586-
if len(indexConfig.QueryTarget) == 2 {
586+
if len(processedConfig.QueryTarget) == 2 {
587587
// Turn on A/B testing
588588
processedConfig.Optimizers = make(map[string]OptimizerConfiguration)
589589
processedConfig.Optimizers[ElasticABOptimizerName] = OptimizerConfiguration{

0 commit comments

Comments
 (0)