From b3580975c872bb20fc6027dca0b97d6d9d022962 Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Tue, 28 Jan 2020 19:22:40 +0100 Subject: Change fieldset query-command to add, not override commands The logic in FieldSet stated that any explicit query-command will deactivate all the standard derived commands. That is inconsistent with query-command on fields, not mentioned in the doc, and will generally break things. This changes to the normal behavior where query-commands are additive. --- .../java/com/yahoo/searchdefinition/derived/IndexInfo.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java') diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java index 02b2a383318..032f7f58e2a 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java @@ -286,16 +286,8 @@ public class IndexInfo extends Derived implements IndexInfoConfig.Producer { // TODO: Move this to the FieldSetSettings processor (and rename it) as that already has to look at this. private void addFieldSetCommands(IndexInfoConfig.Indexinfo.Builder iiB, FieldSet fieldSet) { - // Explicit query commands on the field set, overrides everything. - if (!fieldSet.queryCommands().isEmpty()) { - for (String qc : fieldSet.queryCommands()) { - iiB.command( - new IndexInfoConfig.Indexinfo.Command.Builder() - .indexname(fieldSet.getName()) - .command(qc)); - } - return; - } + for (String qc : fieldSet.queryCommands()) + iiB.command(new IndexInfoConfig.Indexinfo.Command.Builder().indexname(fieldSet.getName()).command(qc)); boolean anyIndexing = false; boolean anyAttributing = false; boolean anyLowerCasing = false; -- cgit v1.2.3