Kernel::System::DynamicFieldSearchBooster

NAME

Kernel::System::DynamicFieldSearchBooster

DESCRIPTION

Provides performance improvements for select type dynamic field values.

PUBLIC INTERFACE

has DynamicFields

Contains the relevant dynamic field objects.

has CacheType

Contains the used cache type for the search booster.

has CacheTTL

Contains the time to live for the search booster cache.

TruncateAll()

This function flushes the search booster table entirely.

    my $Success = $DynamicFieldSearchBoosterObject->TruncateAll();

AllValuesSet()

This function (re)initializes the search booster. All values of relevant dynamic fields will be gathered, the dynamic_field_value_count database table will be cleaned and updated accordingly and the cache will be deleted.

    my $Success = $DynamicFieldSearchBoosterObject->AllValuesSet();

ValueSet()

Adds value for a field. This will create a new entry for this field->value or increment the count.

    my $Success = $DynamicFieldSearchBoosterObject->ValueSet(
        FieldID => 123,
        Value   => 'a value',
    );

ValueDelete()

Removes value for a field. This will determine the value and remove an entry for this field->value or decrements the count.

    my $Success = $DynamicFieldSearchBoosterObject->ValueDelete(
        FieldID  => 123,
        ObjectID => 1234,
    );

AllValuesDelete()

All values of given dynamic field will be removed and the relevant cache cleaned.

    my $Success = $DynamicFieldSearchBoosterObject->AllValuesDelete(
        FieldID => 123,
    );

ObjectValuesDelete()

Removes all values for an object. This will determine all fields with values and remove entries for this field->value or decrements the count.

    my $Success = $DynamicFieldSearchBoosterObject->ObjectValuesDelete(
        ObjectID => 1234,
    );

HistoricalValueGet()

Gets all values for field and returns them as a hash reference.

    my $HistoricalValues = $DynamicFieldSearchBoosterObject->HistoricalValueGet(
        FieldID => 123,
    );

    $HistoricalValues = {
        'value_a' => 'value_a',
        'value_b' => 'value_b',
        'value_c' => 'value_c',
        ...
    };

PRIVATE INTERFACE

_FieldValuesCountGet()

Retrieves historical values and their count for a field from database.

    my $FieldValuesCount = $DynamicFieldSearchBoosterObject->_FieldValuesCountGet(
        FieldID => 123,
    );

    $FieldValuesCount = {
        'value_a' => 1,
        'value_b' => 99,
        'value_c' => 30,
        ...
    };

_FieldValuesCountIncrement()

Adds or increments historical value count in database.

    my $Success = $DynamicFieldSearchBoosterObject->_FieldValuesCountIncrement(
        FieldID => 123,
        Value   => 1234,
    );

_FieldValuesCountDecrement()

Removes or decrements historical value count in database.

    my $Success = $DynamicFieldSearchBoosterObject->_FieldValuesCountDecrement(
        FieldID => 123,
        Value   => 1234,
    );

_FieldValuesCountAdd()

Adds historical value count to database.

    my $Success = $DynamicFieldSearchBoosterObject->_FieldValuesCountAdd(
        FieldID => 123,
        Value   => 1234,
    );

_FieldValuesCountRemove()

removes historical value count to database.

    my $Success = $DynamicFieldSearchBoosterObject->_FieldValuesCountRemove(
        FieldID => 123,
        Value   => 1234,
    );

_FieldValuesCountSet()

Sets new historical value count in database.

    my $Success = $DynamicFieldSearchBoosterObject->_FieldValuesCountSet(
        FieldID => 123,
        Value   => 1234,
        Count   => 3,
    );
Scroll to Top