Indexing
...
Entities
Custom Entity Types

Entity Discovery

2min

To sync any entities first we have to discover them. In order to discover entities for a new entity type we must inject an EntityDiscoveryProvider into the EntityDiscoveryOrchestratorService e.g.

Vendor/Module/etc/di.xml


That CustomTypeEntityDiscoveryProvider will be a virtual type of Klevu\Indexing\Service\Provider\EntityDiscoveryProvider e.g.

Vendor/Module/etc/di.xml


While CUSTOM_TYPE can be any string as long as it does not clash with any existing types, we advise you do not begin the string with KLEVU_. If we add more types in the future and they will begin KLEVU_ which could cause a name clash.

Create the CustomTypeEntityProvider which must implement Klevu\IndexingApi\Service\Provider\EntityProviderInterface

PHP