IndexingScriptChangeValidator { public List<VespaConfigChangeAction> validate(ValidationOverrides overrides, Instant now) { List<VespaConfigChangeAction> result = new ArrayList<>(); for (ImmutableSDField nextField : nextSearch.allConcreteFields()) { String fieldName = nextField.getName(); ImmutableSDField currentField = currentSearch.getConcreteField(fieldName); if (currentField != null) { validateScripts(currentField, nextField, overrides, now).ifPresent(r -> result.add(r)); } } return result; } IndexingScriptChangeValidator(Search currentSearch, Search nextSearch); List<VespaConfigChangeAction> validate(ValidationOverrides overrides, Instant now);  }
@Test public void requireThatOutputExpressionsAreIgnoredInAdvancedScript() throws Exception { assertTrue(new ScriptFixture("{ input foo | switch { case \"audio\": input bar | index; case \"video\": input baz | index; default: 0 | index; }; }", "{ input foo | switch { case \"audio\": input bar | attribute; case \"video\": input baz | attribute; default: 0 | attribute; }; }"). validate()); }