aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahooinc.com>2022-05-31 16:50:18 +0000
committerArne H Juul <arnej@yahooinc.com>2022-05-31 16:57:00 +0000
commite836c45f4b9900bdfa72987a96a13087b106b757 (patch)
tree0d151f4af256cd41ce71b2079578fc6a036d220d /config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java
parent0b3b4099742306aeb2706e6be7251d66152f12ae (diff)
remove some cruft
Diffstat (limited to 'config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java')
-rw-r--r--config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java41
1 files changed, 0 insertions, 41 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java b/config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java
deleted file mode 100644
index a9a2ce7cbb1..00000000000
--- a/config-model/src/main/java/com/yahoo/schema/fieldoperation/DictionaryOperation.java
+++ /dev/null
@@ -1,41 +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.Case;
-import com.yahoo.schema.document.Dictionary;
-import com.yahoo.schema.document.SDField;
-
-/**
- * Represents operations controlling setup of dictionary used for queries
- *
- * @author baldersheim
- */
-public class DictionaryOperation implements FieldOperation {
- public enum Operation { HASH, BTREE, CASED, UNCASED }
- private final Operation operation;
-
- public DictionaryOperation(Operation type) {
- this.operation = type;
- }
- @Override
- public void apply(SDField field) {
- Dictionary dictionary = field.getOrSetDictionary();
- switch (operation) {
- case HASH:
- dictionary.updateType(Dictionary.Type.HASH);
- break;
- case BTREE:
- dictionary.updateType(Dictionary.Type.BTREE);
- break;
- case CASED:
- dictionary.updateMatch(Case.CASED);
- break;
- case UNCASED:
- dictionary.updateMatch(Case.UNCASED);
- break;
- default:
- throw new IllegalArgumentException("Unhandled operation " + operation);
- }
- }
-}