Indexing
Attributes

Discovery

6min

Attribute Discovery

Attribute discovery does not send any data to Klevu.

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

Note: all Magento category and product attributes are added here, even if they do not currently need to be registered with Klevu.

Attribute discovery will:

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

Attribute discovery will NOT:

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

Attribute discovery is triggered:

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

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

Cron

As with all cron tasks added by version 4.x of the Klevu integration, attribute discovery cron tasks use the dedicated klevu cron 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.

Attribute 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:attribute-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
  • attribute-types - [optional] comma-separated list of attribute types to run discovery for, options:
    • KLEVU_PRODUCT
    • KELVU_CATEGORY

e.g

Shell




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