diff options
author | Jon Bratseth <bratseth@verizonmedia.com> | 2020-01-28 19:22:40 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2020-01-28 19:22:40 +0100 |
commit | b3580975c872bb20fc6027dca0b97d6d9d022962 (patch) | |
tree | 28f2f9c54faa88b0b3155211265065d8a6c111fe /config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java | |
parent | 2df0c12a503a0fdff8da459618801fb5037a06f0 (diff) |
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.
Diffstat (limited to 'config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/searchdefinition/derived/IndexInfo.java | 12 |
1 files changed, 2 insertions, 10 deletions
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; |