Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Prevent adapter from connecting to search #61

Merged
merged 3 commits into from
Mar 20, 2024
Merged

Conversation

gowrizrh
Copy link
Contributor

The classes DI injected into the indexer action class contain the elasticsearch adapter \Magento\Elasticsearch\Model\Adapter\Elasticsearch which attempts to connect to the configured search engine when the object manager attempts to create it.

However, in cases where elasticsearch is not used it causes a problem as the class that's requiring it also fails instantiation as described in #60

Ideally, this class shouldn't fail from being created so that the indexer is able to skip it when set in the admin.

@gowrizrh gowrizrh linked an issue Mar 18, 2024 that may be closed by this pull request
@gowrizrh gowrizrh self-assigned this Mar 18, 2024
@gowrizrh gowrizrh added the bug Something isn't working label Mar 18, 2024
Copy link

@brettlaishley brettlaishley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Model/Indexer/LuceneSearch.php Outdated Show resolved Hide resolved
Model/Indexer/LuceneSearch.php Outdated Show resolved Hide resolved
Model/Indexer/LuceneSearch.php Show resolved Hide resolved
@brettlaishley brettlaishley self-requested a review March 18, 2024 04:36
Copy link

@brettlaishley brettlaishley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional changes LGTM

@gowrizrh gowrizrh merged commit dadffed into 3.x Mar 20, 2024
6 checks passed
@gowrizrh gowrizrh deleted the feature/proxy-adapter branch March 20, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable ES index off Asynchronous event logs
3 participants