use of com.yahoo.vespa.model.application.validation.change.VespaConfigChangeAction in project vespa by vespa-engine.
the class AttributeChangeValidator method validateAttributeSettings.
private List<VespaConfigChangeAction> validateAttributeSettings() {
List<VespaConfigChangeAction> result = new ArrayList<>();
for (Attribute nextAttr : nextFields.attributes()) {
Attribute currAttr = currentFields.getAttribute(nextAttr.getName());
if (currAttr != null) {
validateAttributeSetting(currAttr, nextAttr, Attribute::isFastSearch, "fast-search", result);
validateAttributeSetting(currAttr, nextAttr, Attribute::isFastAccess, "fast-access", result);
validateAttributeSetting(currAttr, nextAttr, Attribute::isHuge, "huge", result);
validateAttributeSetting(currAttr, nextAttr, Attribute::densePostingListThreshold, "dense-posting-list-threshold", result);
validateAttributeSetting(currAttr, nextAttr, Attribute::isEnabledOnlyBitVector, "rank: filter", result);
}
}
return result;
}
use of com.yahoo.vespa.model.application.validation.change.VespaConfigChangeAction in project vespa by vespa-engine.
the class IndexingScriptChangeValidator method validate.
public List<VespaConfigChangeAction> validate(ValidationOverrides overrides, Instant now) {
List<VespaConfigChangeAction> result = new ArrayList<>();
for (SDField nextField : nextSearch.allConcreteFields()) {
String fieldName = nextField.getName();
SDField currentField = currentSearch.getConcreteField(fieldName);
if (currentField != null) {
validateScripts(currentField, nextField, overrides, now).ifPresent(r -> result.add(r));
}
}
return result;
}
use of com.yahoo.vespa.model.application.validation.change.VespaConfigChangeAction in project vespa by vespa-engine.
the class DocumentTypeChangeValidatorTest method requireThatChangingTargetTypeOfReferenceFieldIsNotOK.
@Test
public void requireThatChangingTargetTypeOfReferenceFieldIsNotOK() throws Exception {
DocumentTypeChangeValidator validator = new DocumentTypeChangeValidator(createDocumentTypeWithReferenceField("oldDoc"), createDocumentTypeWithReferenceField("newDoc"));
List<VespaConfigChangeAction> result = validator.validate(ValidationOverrides.empty, Instant.now());
assertEquals(1, result.size());
VespaConfigChangeAction action = result.get(0);
assertTrue(action instanceof VespaRefeedAction);
assertEquals("type='refeed', " + "message='Field 'ref' changed: data type: 'Reference<oldDoc>' -> 'Reference<newDoc>'', " + "services=[], documentType=''", action.toString());
}
Aggregations