Class Processor
- java.lang.Object
-
- com.yahoo.searchdefinition.processing.Processor
-
- Direct Known Subclasses:
AddAttributeTransformToSummaryOfImportedFields
,AddExtraFieldsToDocument
,AdjustPositionSummaryFields
,AttributeProperties
,AttributesImplicitWord
,Bolding
,BoolAttributeValidator
,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
,SortingSettings
,StringSettingsOnNonStringFields
,SummaryConsistency
,SummaryDiskAccessValidator
,SummaryDynamicStructsArrays
,SummaryFieldsMustHaveValidSource
,SummaryNamesFieldCollisions
,TagType
,TensorFieldProcessor
,TextMatch
,UriHack
,UrlFieldValidator
,ValidateFieldTypes
,ValidateFieldWithIndexSettingsCreatesIndex
,WordMatch
public abstract class Processor extends Object
Abstract superclass of all search definition processors.- Author:
- bratseth
-
-
Field Summary
Fields Modifier and Type Field Description protected com.yahoo.config.application.api.DeployLogger
deployLogger
protected QueryProfiles
queryProfiles
protected RankProfileRegistry
rankProfileRegistry
protected Schema
schema
-
Constructor Summary
Constructors Constructor Description Processor(Schema schema, com.yahoo.config.application.api.DeployLogger deployLogger, RankProfileRegistry rankProfileRegistry, QueryProfiles queryProfiles)
Base constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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 fieldvoid
fail(Schema schema, com.yahoo.document.Field field, String msg)
protected String
formatError(String schemaName, String fieldName, String msg)
protected void
info(Schema schema, com.yahoo.document.Field field, String message)
protected void
info(String schemaName, String fieldName, String message)
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.protected void
warn(Schema schema, com.yahoo.document.Field field, String message)
protected void
warn(String schemaName, String fieldName, String message)
-
-
-
Field Detail
-
schema
protected final Schema schema
-
deployLogger
protected final com.yahoo.config.application.api.DeployLogger deployLogger
-
rankProfileRegistry
protected final RankProfileRegistry rankProfileRegistry
-
queryProfiles
protected final QueryProfiles queryProfiles
-
-
Constructor Detail
-
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 Detail
-
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)
-
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.
-
newProcessException
protected RuntimeException newProcessException(String schemaName, String fieldName, String msg)
-
newProcessException
protected RuntimeException newProcessException(Schema schema, com.yahoo.document.Field field, String msg)
-
-