diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2020-11-03 15:07:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 15:07:57 +0100 |
commit | 071caa49645637c77abd96a30e66b5cd6424eef5 (patch) | |
tree | bc8b70ffe935e7951515ffa7797429fe015e3385 /config-model | |
parent | 827e31d8b24bee678ab4c84a586ebf2ef06e22ee (diff) | |
parent | 5863d0e39cb17a358fce3caf46f357d9bd6308cb (diff) |
Merge pull request #15124 from vespa-engine/bjorncs/detect-reindexing-config-change
Bjorncs/detect reindexing config change
Diffstat (limited to 'config-model')
8 files changed, 193 insertions, 58 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/IndexingModeChangeValidator.java b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/IndexingModeChangeValidator.java index 08b4b37968c..0b907b43203 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/IndexingModeChangeValidator.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/IndexingModeChangeValidator.java @@ -1,22 +1,30 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.application.validation.change; -import com.yahoo.config.model.api.ConfigChangeAction; -import com.yahoo.vespa.model.VespaModel; import com.yahoo.config.application.api.ValidationId; import com.yahoo.config.application.api.ValidationOverrides; +import com.yahoo.config.model.api.ConfigChangeAction; +import com.yahoo.config.model.api.ServiceInfo; +import com.yahoo.documentmodel.NewDocumentType; +import com.yahoo.vespa.model.VespaModel; +import com.yahoo.vespa.model.content.ContentSearchCluster; import com.yahoo.vespa.model.content.cluster.ContentCluster; +import com.yahoo.vespa.model.search.SearchNode; import java.time.Instant; import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +import static java.util.stream.Collectors.toSet; /** * Returns any change to the indexing mode of a cluster. * * @author hmusum + * @author bjorncs */ public class IndexingModeChangeValidator implements ChangeValidator { @@ -27,31 +35,56 @@ public class IndexingModeChangeValidator implements ChangeValidator { for (Map.Entry<String, ContentCluster> currentEntry : currentModel.getContentClusters().entrySet()) { ContentCluster nextCluster = nextModel.getContentClusters().get(currentEntry.getKey()); if (nextCluster == null) continue; - - Optional<ConfigChangeAction> change = validateContentCluster(currentEntry.getValue(), nextCluster, overrides, now); - if (change.isPresent()) - actions.add(change.get()); + actions.addAll(validateContentCluster(currentEntry.getValue(), nextCluster, overrides, now)); } return actions; } - private Optional<ConfigChangeAction> validateContentCluster(ContentCluster currentCluster, ContentCluster nextCluster, - ValidationOverrides overrides, Instant now) { - boolean currentClusterIsIndexed = currentCluster.getSearch().hasIndexedCluster(); - boolean nextClusterIsIndexed = nextCluster.getSearch().hasIndexedCluster(); - - if (currentClusterIsIndexed == nextClusterIsIndexed) return Optional.empty(); + private List<ConfigChangeAction> validateContentCluster( + ContentCluster currentCluster, ContentCluster nextCluster, ValidationOverrides overrides, Instant now) { + List<ConfigChangeAction> changes = new ArrayList<>(); + ContentSearchCluster currentSearchCluster = currentCluster.getSearch(); + ContentSearchCluster nextSearchCluster = nextCluster.getSearch(); + { + Set<String> currentStreamingTypes = toDocumentTypeNames(currentSearchCluster.getDocumentTypesWithStreamingCluster()); + Set<String> nextIndexedTypes = toDocumentTypeNames(nextSearchCluster.getDocumentTypesWithIndexedCluster()); + for (String type : nextIndexedTypes) { + if (currentStreamingTypes.contains(type)) { + changes.add(createReindexAction(overrides, now, nextCluster, type, "streaming", "indexed")); + } + } + } + { + Set<String> currentIndexedTypes = toDocumentTypeNames(currentSearchCluster.getDocumentTypesWithIndexedCluster()); + Set<String> nextStreamingTypes = toDocumentTypeNames(nextSearchCluster.getDocumentTypesWithStreamingCluster()); + for (String type : nextStreamingTypes) { + if (currentIndexedTypes.contains(type)) { + changes.add(createReindexAction(overrides, now, nextCluster, type, "indexed", "streaming")); + } + } + } + return changes; + } - return Optional.of(VespaRefeedAction.of(currentCluster.id(), - ValidationId.indexModeChange.value(), - overrides, - "Cluster '" + currentCluster.getName() + "' changed indexing mode from '" + - indexingMode(currentClusterIsIndexed) + "' to '" + indexingMode(nextClusterIsIndexed) + "'", - now)); + private static VespaReindexAction createReindexAction( + ValidationOverrides overrides, Instant now, ContentCluster nextCluster, String documentType, String indexModeFrom, String indexModeTo) { + List<ServiceInfo> services = nextCluster.getSearch().getSearchNodes().stream() + .map(SearchNode::getServiceInfo) + .collect(Collectors.toList()); + return VespaReindexAction.of( + nextCluster.id(), + ValidationId.indexModeChange.value(), + overrides, + String.format("Document type '%s' in cluster '%s' changed indexing mode from '%s' to '%s'", documentType, nextCluster.getName(), indexModeFrom, indexModeTo), + services, + documentType, + now); } - private String indexingMode(boolean isIndexed) { - return isIndexed ? "indexed" : "streaming"; + private static Set<String> toDocumentTypeNames(List<NewDocumentType> types) { + return types.stream() + .map(type -> type.getFullName().getName()) + .collect(toSet()); } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/VespaReindexAction.java b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/VespaReindexAction.java new file mode 100644 index 00000000000..f10802afc31 --- /dev/null +++ b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/VespaReindexAction.java @@ -0,0 +1,70 @@ +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.model.application.validation.change; + +import com.yahoo.config.application.api.ValidationOverrides; +import com.yahoo.config.model.api.ConfigChangeReindexAction; +import com.yahoo.config.model.api.ServiceInfo; +import com.yahoo.config.provision.ClusterSpec; + +import java.time.Instant; +import java.util.List; +import java.util.Objects; + +/** + * Represents an action to re-index a document type in order to handle a config change. + * + * @author bjorncs + */ +public class VespaReindexAction extends VespaConfigChangeAction implements ConfigChangeReindexAction { + + /** + * The name of this action, which must be a valid ValidationId. This is a string here because + * the validation ids belong to the Vespa model while these names are exposed to the config server, + * which is model version independent. + */ + private final String name; + private final String documentType; + private final boolean allowed; + + private VespaReindexAction(ClusterSpec.Id id, String name, String message, List<ServiceInfo> services, String documentType, boolean allowed) { + super(id, message, services); + this.name = name; + this.documentType = documentType; + this.allowed = allowed; + } + + public static VespaReindexAction of( + ClusterSpec.Id id, String name, ValidationOverrides overrides, String message, Instant now) { + return new VespaReindexAction(id, name, message, List.of(), /*documentType*/null, overrides.allows(name, now)); + } + + public static VespaReindexAction of( + ClusterSpec.Id id, String name, ValidationOverrides overrides, String message, + List<ServiceInfo> services, String documentType, Instant now) { + return new VespaReindexAction(id, name, message, services, documentType, overrides.allows(name, now)); + } + + @Override + public VespaConfigChangeAction modifyAction(String newMessage, List<ServiceInfo> newServices, String documentType) { + return new VespaReindexAction(clusterId(), name, newMessage, newServices, documentType, allowed); + } + + @Override public String name() { return name; } + @Override public String getDocumentType() { return documentType; } + @Override public boolean allowed() { return allowed; } + @Override public boolean ignoreForInternalRedeploy() { return false; } + @Override public String toString() { return super.toString() + ", documentType='" + documentType + "'"; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + VespaReindexAction that = (VespaReindexAction) o; + return allowed == that.allowed && + Objects.equals(name, that.name) && + Objects.equals(documentType, that.documentType); + } + + @Override public int hashCode() { return Objects.hash(super.hashCode(), name, documentType, allowed); } +} diff --git a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidator.java b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidator.java index 4761d1613b8..8f9b1a3ed77 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidator.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidator.java @@ -1,6 +1,8 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.application.validation.change.search; +import com.yahoo.config.application.api.ValidationId; +import com.yahoo.config.application.api.ValidationOverrides; import com.yahoo.config.provision.ClusterSpec; import com.yahoo.searchdefinition.Search; import com.yahoo.searchdefinition.document.ImmutableSDField; @@ -8,10 +10,8 @@ import com.yahoo.vespa.indexinglanguage.ExpressionConverter; import com.yahoo.vespa.indexinglanguage.expressions.Expression; import com.yahoo.vespa.indexinglanguage.expressions.OutputExpression; import com.yahoo.vespa.indexinglanguage.expressions.ScriptExpression; -import com.yahoo.config.application.api.ValidationId; -import com.yahoo.config.application.api.ValidationOverrides; import com.yahoo.vespa.model.application.validation.change.VespaConfigChangeAction; -import com.yahoo.vespa.model.application.validation.change.VespaRefeedAction; +import com.yahoo.vespa.model.application.validation.change.VespaReindexAction; import java.time.Instant; import java.util.ArrayList; @@ -55,7 +55,7 @@ public class IndexingScriptChangeValidator { ChangeMessageBuilder messageBuilder = new ChangeMessageBuilder(nextField.getName()); new IndexingScriptChangeMessageBuilder(currentSearch, currentField, nextSearch, nextField).populate(messageBuilder); messageBuilder.addChange("indexing script", currentScript.toString(), nextScript.toString()); - return Optional.of(VespaRefeedAction.of(id, ValidationId.indexingChange.value(), overrides, messageBuilder.build(), now)); + return Optional.of(VespaReindexAction.of(id, ValidationId.indexingChange.value(), overrides, messageBuilder.build(), now)); } return Optional.empty(); } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java index 7c057264204..61852ae6bdd 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/content/ContentSearchCluster.java @@ -335,6 +335,28 @@ public class ContentSearchCluster extends AbstractConfigProducer implements Prot .collect(Collectors.toList()); } + public List<NewDocumentType> getDocumentTypesWithStreamingCluster() { + List<NewDocumentType> streamingDocTypes = new ArrayList<>(); + for (NewDocumentType type : documentDefinitions.values()) { + if (findStreamingCluster(type.getFullName().getName()).isPresent()) { + streamingDocTypes.add(type); + } + } + return streamingDocTypes; + } + + public List<NewDocumentType> getDocumentTypesWithIndexedCluster() { + List<NewDocumentType> indexedDocTypes = new ArrayList<>(); + for (NewDocumentType type : documentDefinitions.values()) { + if (findStreamingCluster(type.getFullName().getName()).isEmpty() + && hasIndexedCluster() + && getIndexed().hasDocumentDB(type.getFullName().getName())) { + indexedDocTypes.add(type); + } + } + return indexedDocTypes; + } + @Override public void getConfig(ProtonConfig.Builder builder) { builder.feeding.concurrency(0.50); // As if specified 1.0 in services.xml diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigChangeTestUtils.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigChangeTestUtils.java index 4fd2609eb67..f3f9022f6f0 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigChangeTestUtils.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/ConfigChangeTestUtils.java @@ -37,6 +37,15 @@ public class ConfigChangeTestUtils { return VespaRefeedAction.of(id, name, overrides, message, services, documentType, now); } + public static VespaConfigChangeAction newReindexAction(ClusterSpec.Id id, String name, ValidationOverrides overrides, String message, Instant now) { + return VespaReindexAction.of(id, name, overrides, message, now); + } + + public static VespaConfigChangeAction newReindexAction(ClusterSpec.Id id, String name, ValidationOverrides overrides, String message, + List<ServiceInfo> services, String documentType, Instant now) { + return VespaReindexAction.of(id, name, overrides, message, services, documentType, now); + } + public static List<ConfigChangeAction> normalizeServicesInActions(List<ConfigChangeAction> result) { return result.stream() .map(action -> ((VespaConfigChangeAction) action).modifyAction( diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexingModeChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexingModeChangeValidatorTest.java index ab56178bee3..70995a40181 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexingModeChangeValidatorTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/IndexingModeChangeValidatorTest.java @@ -2,7 +2,7 @@ package com.yahoo.vespa.model.application.validation.change; import com.yahoo.config.model.api.ConfigChangeAction; -import com.yahoo.config.model.api.ConfigChangeRefeedAction; +import com.yahoo.config.model.api.ConfigChangeReindexAction; import com.yahoo.config.provision.Environment; import com.yahoo.vespa.model.VespaModel; import com.yahoo.vespa.model.application.validation.ValidationTester; @@ -29,20 +29,20 @@ public class IndexingModeChangeValidatorTest { List<ConfigChangeAction> changeActions = tester.deploy(oldModel, getServices(AbstractSearchCluster.IndexingMode.STREAMING), Environment.prod, validationOverrides).getSecond(); - assertRefeedChange(true, // allowed=true due to validation override - "Cluster 'default' changed indexing mode from 'indexed' to 'streaming'", + assertReindexingChange(true, // allowed=true due to validation override + "Document type 'music' in cluster 'default' changed indexing mode from 'indexed' to 'streaming'", changeActions); } - private void assertRefeedChange(boolean allowed, String message, List<ConfigChangeAction> changeActions) { - List<ConfigChangeAction> refeedActions = changeActions.stream() - .filter(a -> a instanceof ConfigChangeRefeedAction) + private void assertReindexingChange(boolean allowed, String message, List<ConfigChangeAction> changeActions) { + List<ConfigChangeAction> reindexingActions = changeActions.stream() + .filter(a -> a instanceof ConfigChangeReindexAction) .collect(Collectors.toList()); - assertEquals(1, refeedActions.size()); - assertEquals(allowed, refeedActions.get(0).allowed()); - assertTrue(refeedActions.get(0) instanceof ConfigChangeRefeedAction); - assertEquals("indexing-mode-change", ((ConfigChangeRefeedAction)refeedActions.get(0)).name()); - assertEquals(message, refeedActions.get(0).getMessage()); + assertEquals(1, reindexingActions.size()); + assertEquals(allowed, reindexingActions.get(0).allowed()); + assertTrue(reindexingActions.get(0) instanceof ConfigChangeReindexAction); + assertEquals("indexing-mode-change", ((ConfigChangeReindexAction)reindexingActions.get(0)).name()); + assertEquals(message, reindexingActions.get(0).getMessage()); } private static final String getServices(AbstractSearchCluster.IndexingMode indexingMode) { diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/DocumentDatabaseChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/DocumentDatabaseChangeValidatorTest.java index 60b17142340..a4fbf474a7f 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/DocumentDatabaseChangeValidatorTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/DocumentDatabaseChangeValidatorTest.java @@ -10,6 +10,7 @@ import java.time.Instant; import java.util.Arrays; import java.util.List; +import static com.yahoo.vespa.model.application.validation.change.ConfigChangeTestUtils.newReindexAction; import static com.yahoo.vespa.model.application.validation.change.ConfigChangeTestUtils.newRestartAction; import static com.yahoo.vespa.model.application.validation.change.ConfigChangeTestUtils.newRefeedAction; @@ -51,7 +52,7 @@ public class DocumentDatabaseChangeValidatorTest { "Field 'f1' changed: add attribute aspect"), newRestartAction(ClusterSpec.Id.from("test"), "Field 'f4.s1' changed: add attribute aspect"), - newRefeedAction(ClusterSpec.Id.from("test"), + newReindexAction(ClusterSpec.Id.from("test"), "indexing-change", ValidationOverrides.empty, "Field 'f2' changed: add index aspect, indexing script: '{ input f2 | summary f2; }' -> " + diff --git a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java index 8ffd02a4381..9f418476a24 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/application/validation/change/search/IndexingScriptChangeValidatorTest.java @@ -1,11 +1,11 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.application.validation.change.search; +import com.yahoo.config.application.api.ValidationOverrides; import com.yahoo.config.provision.ClusterSpec; import com.yahoo.vespa.indexinglanguage.expressions.ScriptExpression; -import com.yahoo.config.application.api.ValidationOverrides; import com.yahoo.vespa.model.application.validation.change.VespaConfigChangeAction; -import com.yahoo.vespa.model.application.validation.change.VespaRefeedAction; +import com.yahoo.vespa.model.application.validation.change.VespaReindexAction; import org.junit.Test; import java.time.Instant; @@ -50,12 +50,12 @@ public class IndexingScriptChangeValidatorTest { private static final String FIELD = "field f1 type string"; private static final String FIELD_F2 = "field f2 type string"; - private static VespaConfigChangeAction expectedAction(String changedMsg, String fromScript, String toScript) { - return expectedAction("f1", changedMsg, fromScript, toScript); + private static VespaConfigChangeAction expectedReindexingAction(String changedMsg, String fromScript, String toScript) { + return expectedReindexingAction("f1", changedMsg, fromScript, toScript); } - private static VespaConfigChangeAction expectedAction(String field, String changedMsg, String fromScript, String toScript) { - return VespaRefeedAction.of(ClusterSpec.Id.from("test"), + private static VespaConfigChangeAction expectedReindexingAction(String field, String changedMsg, String fromScript, String toScript) { + return VespaReindexAction.of(ClusterSpec.Id.from("test"), "indexing-change", ValidationOverrides.empty, "Field '" + field + "' changed: " + @@ -65,67 +65,67 @@ public class IndexingScriptChangeValidatorTest { } @Test - public void requireThatAddingIndexAspectRequireRefeed() throws Exception { + public void requireThatAddingIndexAspectRequireReindexing() throws Exception { new Fixture(FIELD + " { indexing: summary }", FIELD + " { indexing: index | summary }"). - assertValidation(expectedAction("add index aspect", + assertValidation(expectedReindexingAction("add index aspect", "{ input f1 | summary f1; }", "{ input f1 | tokenize normalize stem:\"BEST\" | index f1 | summary f1; }")); } @Test - public void requireThatRemovingIndexAspectRequireRefeed() throws Exception { + public void requireThatRemovingIndexAspectRequireReindexing() throws Exception { new Fixture(FIELD + " { indexing: index | summary }", FIELD + " { indexing: summary }"). - assertValidation(expectedAction("remove index aspect", + assertValidation(expectedReindexingAction("remove index aspect", "{ input f1 | tokenize normalize stem:\"BEST\" | index f1 | summary f1; }", "{ input f1 | summary f1; }")); } @Test - public void requireThatChangingStemmingRequireRefeed() throws Exception { + public void requireThatChangingStemmingRequireReindexing() throws Exception { new Fixture(FIELD + " { indexing: index }", FIELD + " { indexing: index \n stemming: none }"). - assertValidation(expectedAction("stemming: 'best' -> 'none'", + assertValidation(expectedReindexingAction("stemming: 'best' -> 'none'", "{ input f1 | tokenize normalize stem:\"BEST\" | index f1; }", "{ input f1 | tokenize normalize | index f1; }")); } @Test - public void requireThatChangingNormalizingRequireRefeed() throws Exception { + public void requireThatChangingNormalizingRequireReindexing() throws Exception { new Fixture(FIELD + " { indexing: index }", FIELD + " { indexing: index \n normalizing: none }"). - assertValidation(expectedAction("normalizing: 'ACCENT' -> 'NONE'", + assertValidation(expectedReindexingAction("normalizing: 'ACCENT' -> 'NONE'", "{ input f1 | tokenize normalize stem:\"BEST\" | index f1; }", "{ input f1 | tokenize stem:\"BEST\" | index f1; }")); } @Test - public void requireThatChangingMatchingRequireRefeed() throws Exception { + public void requireThatChangingMatchingRequireReindexing() throws Exception { new Fixture(FIELD + " { indexing: index \n match: exact }", FIELD + " { indexing: index \n match { gram \n gram-size: 3 } }"). - assertValidation(expectedAction("matching: 'exact' -> 'gram (size 3)', normalizing: 'LOWERCASE' -> 'CODEPOINT'", + assertValidation(expectedReindexingAction("matching: 'exact' -> 'gram (size 3)', normalizing: 'LOWERCASE' -> 'CODEPOINT'", "{ input f1 | exact | index f1; }", "{ input f1 | ngram 3 | index f1; }")); } @Test - public void requireThatSettingDynamicSummaryRequireRefeed() throws Exception { + public void requireThatSettingDynamicSummaryRequireReindexing() throws Exception { new Fixture(FIELD + " { indexing: summary }", FIELD + " { indexing: summary \n summary: dynamic }"). - assertValidation(expectedAction("summary field 'f1' transform: 'none' -> 'dynamicteaser'", + assertValidation(expectedReindexingAction("summary field 'f1' transform: 'none' -> 'dynamicteaser'", "{ input f1 | summary f1; }", "{ input f1 | tokenize normalize stem:\"BEST\" | summary f1; }")); } @Test - public void requireThatMultipleChangesRequireRefeed() throws Exception { + public void requireThatMultipleChangesRequireReindexing() throws Exception { new Fixture(FIELD + " { indexing: index } " + FIELD_F2 + " { indexing: index }", FIELD + " { indexing: index \n stemming: none } " + FIELD_F2 + " { indexing: index \n normalizing: none }"). - assertValidation(Arrays.asList(expectedAction("f1", "stemming: 'best' -> 'none'", + assertValidation(Arrays.asList(expectedReindexingAction("f1", "stemming: 'best' -> 'none'", "{ input f1 | tokenize normalize stem:\"BEST\" | index f1; }", "{ input f1 | tokenize normalize | index f1; }"), - expectedAction("f2", "normalizing: 'ACCENT' -> 'NONE'", + expectedReindexingAction("f2", "normalizing: 'ACCENT' -> 'NONE'", "{ input f2 | tokenize normalize stem:\"BEST\" | index f2; }", "{ input f2 | tokenize stem:\"BEST\" | index f2; }"))); } |