Skip to content

Documents are not indexed #374

@chilladelia

Description

@chilladelia

Hello Pimcore team,
I am wondering how you managed to index documents into the generic data index?

After some debugging I found out that documents are not added to the generic_data_index_queuetable.

The reason is that an INSERT IGNORE is used, which supresses the error: https://github.com/pimcore/generic-data-index-bundle/blob/2.x/src/Repository/IndexQueueRepository.php#L390

When executing the query without IGNORE I get the actual error:

INSERT INTO `generic_data_index_queue` (`elementId`, `elementType`, `elementIndexName`, `operation`, `operationTime`, `dispatched`) VALUES (1, 'document', 'document', 'update', 1764780528858, 0)

Field "id" does not have a default value.

I suppose id needs to be defined as autoincrement in IndexQueue.php (https://github.com/pimcore/generic-data-index-bundle/blob/2.x/src/Entity/IndexQueue.php#L33) ? Currently it isn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions