0

Magento creates an index in ES for various search features. I'm interested where in the code is index created/updated/repopulated?

I'm thinking some cron or indexer. I've looked in module-catalog-search and module-catalog-advanced-search but can't seem to find the code that actually builds and sends the request to ES.

EDIT: \Magento\Elasticsearch\Model\Adapter\Index\Builder::build() this what I have atm.

1 Answer 1

0
\Magento\Elasticsearch\Model\Adapter\Elasticsearch::prepareIndex()

The index general structure is defined here

$this->client->createIndex($indexName, ['settings' => $settings]);

Attribute information is added here

$this->client->addFieldsMapping(
            $allAttributeTypes,
            $indexName,
            $this->clientConfig->getEntityType()
        );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.