diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-05-31 19:09:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-31 19:09:45 +0200 |
commit | f68838b632e8af9cad24568bd5354ed1db0aa685 (patch) | |
tree | 0d151f4af256cd41ce71b2079578fc6a036d220d /config-model/src/main/java/com/yahoo/schema/fieldoperation/RankTypeOperation.java | |
parent | 0b3b4099742306aeb2706e6be7251d66152f12ae (diff) | |
parent | e836c45f4b9900bdfa72987a96a13087b106b757 (diff) |
Merge pull request #22817 from vespa-engine/arnej/remove-field-opsv7.592.17
remove some cruft
Diffstat (limited to 'config-model/src/main/java/com/yahoo/schema/fieldoperation/RankTypeOperation.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/schema/fieldoperation/RankTypeOperation.java | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/fieldoperation/RankTypeOperation.java b/config-model/src/main/java/com/yahoo/schema/fieldoperation/RankTypeOperation.java deleted file mode 100644 index 4a43a907549..00000000000 --- a/config-model/src/main/java/com/yahoo/schema/fieldoperation/RankTypeOperation.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.schema.fieldoperation; - -import com.yahoo.schema.document.RankType; -import com.yahoo.schema.document.SDField; -import com.yahoo.schema.Index; - -/** - * @author Einar M R Rosenvinge - */ -public class RankTypeOperation implements FieldOperation { - - private String indexName; - private RankType type; - - public String getIndexName() { - return indexName; - } - public void setIndexName(String indexName) { - this.indexName = indexName; - } - - public RankType getType() { - return type; - } - public void setType(RankType type) { - this.type = type; - } - - public void apply(SDField field) { - if (indexName == null) { - field.setRankType(type); // Set default if the index is not specified. - } else { - Index index = field.getIndex(indexName); - if (index == null) { - index = new Index(indexName); - field.addIndex(index); - } - index.setRankType(type); - } - } - -} |