ISolrImportCustomValues.FillValues

Syntax

FillValues(MbObject: IMetabaseObject; Values: ISolrFieldValues);

Parameters

MbObject. Data source, which is currently indexed.

Values. Collection of custom fields values, which will be sent for indexing.

Description

The FillValues method forms documents for custom fields indexing according to the specified parameters.

Comments

The FillValues method must be redetermined in the custom class. Specify the code in the method, which will fill in values of custom fields in the Values collection. The method will be executed for each indexed object, the object will be available in the MbObject parameter.

Example

Class CSolrImportCustomValues: Object, ISolrImportCustomValues
    Sub FillValues(MbObject: IMetabaseObject; Values: ISolrFieldValues);
    Begin
        //Determine custom fields values for object with specified key
        If MbObject.Key = 19815 Then
            Values.FindById("TAG", SearchEngineTargetType.SourceData).Value := "...";
        End If;
        //If object class corresponds to table dictionary, objects metadata is indexed
        If MbObject.ClassId = MetabaseObjectClass.KE_CLASS_STDDIM Then
            Values.FindById("COMMENTS", SearchEngineTargetType.MbObject).Value := "...";
        End If;
    End Sub FillValues;
End Class CSolrImportCustomValues;

The example is a macro containing implementation of the method, which fills in custom fields values on indexing. The method is executed for each indexed object, the check is executed by key and object class in the method code. Depending on the executed condition, different custom fields are filled in.

See also:

ISolrImportCustomValues | System and Custom Fields