-
Couldn't load subscription status.
- Fork 172
MAGE-1319 Refactor for backend search client support #1850
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
base: release/3.18.0-dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! 👏
I have a few comments, let me know what you think about it :)
| * | ||
| * @throws NoSuchEntityException | ||
| */ | ||
| protected function safeBuildWithComputedIndex(string $indexSuffix, int $storeId, bool $isTmp = false): IndexOptionsInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there a particular reason not to simply replace buildWithComputedIndex by this implementation on the parent class ?
The Index Options management begins to be quite complex and I'm wondering if it's necessary
| 'isTmp' => $indexOptions->isTemporaryIndex() | ||
| ] | ||
| ); | ||
| throw new AlgoliaException($msg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which function should we use to please our Codacy friend here ? addslashes() maybe ?
| use Algolia\AlgoliaSearch\Service\AlgoliaConnector; | ||
| use Magento\Framework\Exception\NoSuchEntityException; | ||
|
|
||
| class BackendSearch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we plan to re-use the getSearchResult() method for the search adapter ?
Currently its only used in the AdapterHelper::getDocumentsFromAlgolia() method, which is not supposed to be used as well. (also in an integration test though but we can change it I guess)
If we don't plan to re-use them, maybe this is the right time to remove them ?
Summary
The PR provides support for extension via the search adapter:
IndexOptionsBuilderwith improved error handlingAlgoliaConnectorAlgoliaHelperhas been removedResult
Updated logging:

Fixed integration test:

IndexOptionsBuilder unit tests:
