Kernel::System::DocumentSearch::Role::DynamicField::Base

Table of Contents

NAME

Kernel::System::DocumentSearch::Role::DynamicField::Base – provides Document search methods for Dynamic fields.

NOTE: This role is consumed by 'Kernel::System::DynamicField::Driver::Base' to be the default for any dynamic field. it could be moved to be consumed by the other roles instead when all Document Search dynamic fields are migrated to consume roles.

IndexableValueGet()

Gets the value for the specific object id in a prepared format, that can be used by related document search drivers. This method expects the same parameters as ValueGet.

    my $IndexableValue = $Driver->IndexableValueGet(
        ObjectID => 123,
    );

The return value is a hash reference, containing at least the value to be indexed and might contain a field name to be used in the related document and a possible pipeline name to be used during the indexing process:

    {
        Type  => 'Text',
        Value => 'My value',
    }

    or

    {
        Type  => 'Text',
        Value => [ 'My value', 'Another value' ],
    }

    or

    {
        Pipeline => 'Attachment',
        Field    => 'Attachments',
        Value    => [
            {
                data     => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTg[...]',
                filename => 'myfile.pdf',
            },
            {
                data     => 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTg[...]',
                filename => 'anotherfile.pdf',
            },
        ],
    }

For more information about document search drivers and their indexing behavior, please take a look at Kernel::System::DocumentSearch::BaseDriver.

Scroll to Top