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.
That CustomTypeEntityDiscoveryProvider will be a virtual type of Klevu\Indexing\Service\Provider\EntityDiscoveryProvider e.g.
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
Updated 03 Jan 2025
Did this page help you?