Indexing
Entities

Discovery

6min

Entity Discovery

Entity discovery does not send any data via the API to Klevu.

Its only purpose is to add missing entities to the klevu_indexing_entity database table or to set entities that are no longer indexable to have a next action of Delete.

Note: all Magento category, CMS page and product entities are added here, even if they do not currently need to be indexed with Klevu.

Entity discovery will:

  • add any missing entities and determine if those entities are indexable.
  • set any entities which are no longer indexable, but were previously registered, to have a next_action of Delete.
  • set any entities that have become indexable to have a next_action of Add.

Entity discovery will NOT:

  • determine if an entity requires an update.
  • send any data to Klevu.

Entity discovery is triggered:

  • on account integration
  • via plugins
  • via observers
  • via cron
  • via CLI

\Klevu\Indexing\Service\EntityDiscoveryOrchestratorServiceis responsible for entity discovery. All the above methods of triggering entity discovery use this service.

Cron

As with all cron tasks added by version 4.x of the Klevu integration, entity discovery cron tasks use the dedicated klevu group, allowing granular configuration of scheduling and run options.

We recommend using the native Magento cron to run these jobs, configuring schedules if necessary, rather than a custom server-side cron implementation of the CLI command.

Entity discovery runs once a day via cron. The configuration for the cron can be found here module-m2-indexing/etc/crontab.xml

module-m2-indexing/etc/crontab.xml


CLI

klevu:indexing:entity-discovery

The discovery can also be triggered via CLI and has 2 optional parameters

  • api-keys - [optional] comma-separated list of API keys to run discovery for
  • entity-types - [optional] comma-separated list of entity types to run discovery for, options:
    • KLEVU_PRODUCT
    • KELVU_CATEGORY
    • KLEVU_CMS

e.g

Shell




Updated 23 Sep 2024
Doc contributor
Doc contributor
Did this page help you?