Class ValidateFieldTypes
- java.lang.Object
-
- com.yahoo.searchdefinition.processing.Processor
-
- com.yahoo.searchdefinition.processing.ValidateFieldTypes
-
- Direct Known Subclasses:
ValidateFieldTypesDocumentsOnly
public class ValidateFieldTypes extends Processor
This Processor makes sure all fields with the same name have the sameDataType
. This check explicitly disregards whether a field is an index field, an attribute or a summary field. This is a requirement if we hope to move to a model where index fields, attributes and summary fields share a common field class.- Author:
- Simon Thoresen Hult
-
-
Field Summary
-
Fields inherited from class com.yahoo.searchdefinition.processing.Processor
deployLogger, queryProfiles, rankProfileRegistry, schema
-
-
Constructor Summary
Constructors Constructor Description ValidateFieldTypes(Schema schema, com.yahoo.config.application.api.DeployLogger deployLogger, RankProfileRegistry rankProfileRegistry, QueryProfiles queryProfiles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
process(boolean validate, boolean documentsOnly)
Processes the input search definition by modifying the input search and its documents, and returns the input search definition.protected void
verifySearchAndDocFields(String searchName, Map<String,com.yahoo.document.DataType> seenFields)
protected void
verifySummaryFields(String searchName, Map<String,com.yahoo.document.DataType> seenFields)
-
Methods inherited from class com.yahoo.searchdefinition.processing.Processor
addField, fail, formatError, info, info, matchingRankSettingsIterator, newProcessException, newProcessException, process, warn, warn
-
-
-
-
Constructor Detail
-
ValidateFieldTypes
public ValidateFieldTypes(Schema schema, com.yahoo.config.application.api.DeployLogger deployLogger, RankProfileRegistry rankProfileRegistry, QueryProfiles queryProfiles)
-
-
Method Detail
-
process
public void process(boolean validate, boolean documentsOnly)
Description copied from class:Processor
Processes the input search definition by modifying the input search and its documents, and returns the input search definition.- Specified by:
process
in classProcessor
- Parameters:
validate
- true to throw exceptions on validation errors, false to make the best possible effort at completing processing without throwing an exception. If we are not validating, emitting warnings have no effect and can (but must not) be skipped.documentsOnly
- true to skip processing (including validation, regardless of the validate setting) of aspects not relating to document definitions (e.g rank profiles)
-
verifySearchAndDocFields
protected final void verifySearchAndDocFields(String searchName, Map<String,com.yahoo.document.DataType> seenFields)
-
-