Package com.yahoo.schema.processing
Class Processor
java.lang.Object
com.yahoo.schema.processing.Processor
- Direct Known Subclasses:
AddDataTypeAndTransformToSummaryOfImportedFields
,AddExtraFieldsToDocument
,AdjustPositionSummaryFields
,AdjustSummaryTransforms
,AttributeProperties
,AttributesImplicitWord
,Bolding
,BuiltInFieldSets
,CreatePositionZCurve
,DictionaryProcessor
,DisallowComplexMapAndWsetKeyTypes
,DiversitySettingsValidator
,ExactMatch
,FastAccessValidator
,FieldSetSettings
,FilterFieldNames
,ImplicitSummaries
,ImplicitSummaryFields
,ImportedFieldsResolver
,IndexFieldNames
,IndexingInputs
,IndexingOutputs
,IndexingValidation
,IndexingValues
,IntegerIndex2Attribute
,LiteralBoost
,MakeAliases
,MakeDefaultSummaryTheSuperSet
,MatchConsistency
,MatchedElementsOnlyResolver
,MatchPhaseSettingsValidator
,MultifieldIndexHarmonizer
,MutableAttributes
,NGramMatch
,OnnxModelConfigGenerator
,OnnxModelTypeResolver
,OptimizeIlscript
,PagedAttributeValidator
,PredicateProcessor
,RankingExpressionTypeResolver
,RankProfileTypeSettingsProcessor
,ReferenceFieldsProcessor
,ReservedDocumentNames
,ReservedFunctionNames
,SearchMustHaveDocument
,SetRankTypeEmptyOnFilters
,SingleValueOnlyAttributeValidator
,SortingSettings
,StringSettingsOnNonStringFields
,SummaryConsistency
,SummaryDiskAccessValidator
,SummaryDynamicStructsArrays
,SummaryFieldsMustHaveValidSource
,SummaryNamesFieldCollisions
,TagType
,TensorFieldProcessor
,TextMatch
,TokensTransformValidator
,UriHack
,UrlFieldValidator
,ValidateFieldTypes
,ValidateFieldWithIndexSettingsCreatesIndex
,ValidateStructTypeInheritance
,WordMatch
Abstract superclass of all search definition processors.
- Author:
- bratseth
-
Field Summary
Modifier and TypeFieldDescriptionprotected final com.yahoo.config.application.api.DeployLogger
protected final QueryProfiles
protected final RankProfileRegistry
protected final Schema
-
Constructor Summary
ConstructorDescriptionProcessor
(Schema schema, com.yahoo.config.application.api.DeployLogger deployLogger, RankProfileRegistry rankProfileRegistry, QueryProfiles queryProfiles) Base constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected SDField
Convenience method for adding a no-strings-attached implementation field for a regular fieldvoid
protected String
formatError
(String schemaName, String fieldName, String msg) protected void
protected void
protected Iterator<RankProfile.RankSetting>
matchingRankSettingsIterator
(Schema schema, RankProfile.RankSetting.Type type) Returns an iterator of all the rank settings with given type in all the rank profiles in this search definition.protected RuntimeException
newProcessException
(Schema schema, com.yahoo.document.Field field, String msg) protected RuntimeException
newProcessException
(String schemaName, String fieldName, String msg) abstract 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.void
process
(boolean validate, boolean documentsOnly, com.yahoo.config.model.api.ModelContext.Properties properties) As above, possibly with properties from a context.protected void
protected void
-
Field Details
-
schema
-
deployLogger
protected final com.yahoo.config.application.api.DeployLogger deployLogger -
rankProfileRegistry
-
queryProfiles
-
-
Constructor Details
-
Processor
public Processor(Schema schema, com.yahoo.config.application.api.DeployLogger deployLogger, RankProfileRegistry rankProfileRegistry, QueryProfiles queryProfiles) Base constructor- Parameters:
schema
- the search to processdeployLogger
- Logger du use when logging deploy output.rankProfileRegistry
- Registry with all rank profiles, used for lookup and insertion.queryProfiles
- The query profiles contained in the application this search is part of.
-
-
Method Details
-
process
public abstract 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.- 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)
-
process
public void process(boolean validate, boolean documentsOnly, com.yahoo.config.model.api.ModelContext.Properties properties) As above, possibly with properties from a context. Override if needed. -
addField
protected SDField addField(Schema schema, SDField field, String suffix, String indexing, String queryCommand) Convenience method for adding a no-strings-attached implementation field for a regular field- Parameters:
schema
- the search definition in questionfield
- the field to add an implementation field forsuffix
- the suffix of the added implementation field (without the underscore)indexing
- the indexing statement of the fieldqueryCommand
- the query command of the original field, or null if none- Returns:
- the implementation field which is added to the search
-
matchingRankSettingsIterator
protected Iterator<RankProfile.RankSetting> matchingRankSettingsIterator(Schema schema, RankProfile.RankSetting.Type type) Returns an iterator of all the rank settings with given type in all the rank profiles in this search definition. -
formatError
-
newProcessException
-
newProcessException
protected RuntimeException newProcessException(Schema schema, com.yahoo.document.Field field, String msg) -
fail
-
warn
-
warn
-
info
-
info
-