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

Search Not Working and Error During Reindexing #14

Closed
amcguireweb opened this issue Sep 1, 2023 · 0 comments
Closed

Search Not Working and Error During Reindexing #14

amcguireweb opened this issue Sep 1, 2023 · 0 comments

Comments

@amcguireweb
Copy link

Hello,

We have been using Algolia for the last couple of years but cost has increased so much we have to find an alternative. I am attempting to try Typesense, but I'm not having any luck getting the search to work with this module. After configuring, I can see indexes have been created inside my cloud.typesense.org account but search on the frontend is now the default Magento search for some reason (no Algolia autocomplete, no instant search results). I also seem to be getting an error when reindexing when it reaches the algolia_queue_runner index. I am not aware of any other errors being logged. Maybe I'm missing something or I have something misconfigured?

The version of Magento you're using.
Magento Commerce 2.4.3 on Magento Cloud

Your Typesense configuration details (please omit any sensitive information).
Enabled: Enable
Cloud ID: xxxxxxxx
Admin API Key: xxxxxxxx
Search Only Key: null
Nodes: xxxxxxxxxxxxxx-x.xx.typesense.net
Path: null
Port: 443
Protocol: HTTPS
Index Method: Typesense Only

If available, any additional stack trace details. You might find these in var/logs.
2023-09-01T16:46:07+00:00 ERROR: Typesense\Exceptions\ObjectNotFound:
Not Found in /var/www/html/vendor/typesense/typesense-php/src/ApiCall.php:348
Stack trace:
#0 /var/www/html/vendor/typesense/typesense-php/src/ApiCall.php(237): Typesense\ApiCall->getException(404)
#1 /var/www/html/vendor/typesense/typesense-php/src/ApiCall.php(125): Typesense\ApiCall->makeRequest('post', '/collections/m2...', false, Array)
#2 /var/www/html/vendor/typesense/typesense-php/src/Documents.php(147): Typesense\ApiCall->post('/collections/m2...', '{"objectID":"70...', false, Array)
#3 /var/www/html/vendor/develodesign/magento2-module-typesense/Adapter/Client.php(97): Typesense\Documents->import(Array, Array)
#4 /var/www/html/vendor/develodesign/magento2-module-typesense/Plugin/Backend/Algolia/AlgoliaSearch/Helper/AlgoliaHelperPlugin.php(63): Develo\Typesense\Adapter\Client->addData('m2_aaronlocal_d...', Array)
#5 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Develo\Typesense\Plugin\Backend\Algolia\AlgoliaSearch\Helper\AlgoliaHelperPlugin->aroundAddObjects(Object(Algolia\AlgoliaSearch\Helper\AlgoliaHelper\Interceptor), Object(Closure), Array, 'm2_aaronlocal_d...')
#6 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Algolia\AlgoliaSearch\Helper\AlgoliaHelper\Interceptor->Magento\Framework\Interception{closure}(Array, 'm2_aaronlocal_d...')
#7 /var/www/html/generated/code/Algolia/AlgoliaSearch/Helper/AlgoliaHelper/Interceptor.php(149): Algolia\AlgoliaSearch\Helper\AlgoliaHelper\Interceptor->___callPlugins('addObjects', Array, NULL)
#8 /var/www/html/vendor/algolia/algoliasearch-magento-2/Helper/Data.php(517): Algolia\AlgoliaSearch\Helper\AlgoliaHelper\Interceptor->addObjects(Array, 'm2_aaronlocal_d...')
#9 /var/www/html/generated/code/Algolia/AlgoliaSearch/Helper/Data/Interceptor.php(122): Algolia\AlgoliaSearch\Helper\Data->rebuildStoreSuggestionIndexPage(10, Object(Magento\Search\Model\ResourceModel\Query\Collection\Interceptor), 1, 300)
#10 /var/www/html/vendor/algolia/algoliasearch-magento-2/Helper/Data.php(376): Algolia\AlgoliaSearch\Helper\Data\Interceptor->rebuildStoreSuggestionIndexPage(10, Object(Magento\Search\Model\ResourceModel\Query\Collection\Interceptor), 1, 300)
#11 /var/www/html/generated/code/Algolia/AlgoliaSearch/Helper/Data/Interceptor.php(77): Algolia\AlgoliaSearch\Helper\Data->rebuildStoreSuggestionIndex(10)
#12 [internal function]: Algolia\AlgoliaSearch\Helper\Data\Interceptor->rebuildStoreSuggestionIndex(10)
#13 /var/www/html/vendor/algolia/algoliasearch-magento-2/Model/Job.php(76): call_user_func_array(Array, Array)
#14 /var/www/html/vendor/algolia/algoliasearch-magento-2/Model/Queue.php(226): Algolia\AlgoliaSearch\Model\Job->execute()
#15 /var/www/html/vendor/algolia/algoliasearch-magento-2/Model/Queue.php(311): Algolia\AlgoliaSearch\Model\Queue->processJob(Object(Algolia\AlgoliaSearch\Model\Job))
#16 /var/www/html/vendor/algolia/algoliasearch-magento-2/Model/Queue.php(195): Algolia\AlgoliaSearch\Model\Queue->run(8)
#17 /var/www/html/vendor/algolia/algoliasearch-magento-2/Model/Indexer/QueueRunner.php(55): Algolia\AlgoliaSearch\Model\Queue->runCron()
#18 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Algolia\AlgoliaSearch\Model\Indexer\QueueRunner->executeFull()
#19 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Algolia\AlgoliaSearch\Model\Indexer\QueueRunner\Interceptor->___callParent('executeFull', Array)
#20 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Algolia\AlgoliaSearch\Model\Indexer\QueueRunner\Interceptor->Magento\Framework\Interception{closure}()
#21 /var/www/html/generated/code/Algolia/AlgoliaSearch/Model/Indexer/QueueRunner/Interceptor.php(32): Algolia\AlgoliaSearch\Model\Indexer\QueueRunner\Interceptor->___callPlugins('executeFull', Array, Array)
#22 /var/www/html/vendor/magento/module-indexer/Model/Indexer.php(443): Algolia\AlgoliaSearch\Model\Indexer\QueueRunner\Interceptor->executeFull()
#23 /var/www/html/generated/code/Magento/Indexer/Model/Indexer/Interceptor.php(230): Magento\Indexer\Model\Indexer->reindexAll()
#24 /var/www/html/vendor/magento/module-indexer/Model/Indexer/DependencyDecorator.php(259): Magento\Indexer\Model\Indexer\Interceptor->reindexAll()
#25 /var/www/html/vendor/magento/module-indexer/Console/Command/IndexerReindexCommand.php(110): Magento\Indexer\Model\Indexer\DependencyDecorator->reindexAll()
#26 /var/www/html/vendor/symfony/console/Command/Command.php(255): Magento\Indexer\Console\Command\IndexerReindexCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Indexer\Console\Command\IndexerReindexCommand\Interceptor->___callParent('run', Array)
#29 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Indexer\Console\Command\IndexerReindexCommand\Interceptor->Magento\Framework\Interception{closure}(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#30 /var/www/html/generated/code/Magento/Indexer/Console/Command/IndexerReindexCommand/Interceptor.php(86): Magento\Indexer\Console\Command\IndexerReindexCommand\Interceptor->___callPlugins('run', Array, Array)
#31 /var/www/html/vendor/symfony/console/Application.php(1021): Magento\Indexer\Console\Command\IndexerReindexCommand\Interceptor->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#32 /var/www/html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Indexer\Console\Command\IndexerReindexCommand\Interceptor), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#33 /var/www/html/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#34 /var/www/html/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 /var/www/html/bin/magento(23): Symfony\Component\Console\Application->run()
#36 {main}

Also, does this error appear when you execute bin/magento index:reindex?
Yes
$ bin/magento indexer:reindex
Design Config Grid index has been rebuilt successfully in 00:00:01
Customer Grid index has been rebuilt successfully in 00:00:01
Category Products index has been rebuilt successfully in 01:05:39
Product Categories index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:12
Product EAV index has been rebuilt successfully in 00:00:00
Inventory index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Stock index has been rebuilt successfully in 00:00:32
Product Price index has been rebuilt successfully in 00:14:59
Catalog Attributes Feed index has been rebuilt successfully in 00:00:00
Category Feed index has been rebuilt successfully in 00:00:09
Catalog Product Permissions index has been rebuilt successfully in 00:00:41
Product/Target Rule index has been rebuilt successfully in 00:00:00
Target Rule/Product index has been rebuilt successfully in 00:00:00
Catalog Category Permissions index has been rebuilt successfully in 00:00:00
Catalog Search index has been rebuilt successfully in 00:02:48
Product Feed index has been rebuilt successfully in 00:41:17
Product Overrides Feed index has been rebuilt successfully in 00:13:31
Product Variant Feed index has been rebuilt successfully in 00:03:21
Sales Rule index has been rebuilt successfully in 00:00:01
Algolia Search Products index has been rebuilt successfully in 00:00:03
Algolia Search Categories index has been rebuilt successfully in 00:00:01
Algolia Search Pages index has been rebuilt successfully in 00:00:00
Algolia Search Suggestions index has been rebuilt successfully in 00:00:00
Algolia Additional Sections index has been rebuilt successfully in 00:00:00
Algolia Search Queue Runner index 2023-08-31T22:36:06+00:00 ERROR: Typesense\Exceptions\ObjectNotFound:
Not Found in /var/www/html/vendor/typesense/typesense-php/src/ApiCall.php:348
Stack trace:
#0 /var/www/html/vendor/typesense/typesense-php/src/ApiCall.php(237): Typesense\ApiCall->getException(404)
#1 /var/www/html/vendor/typesense/typesense-php/src/ApiCall.php(125): Typesense\ApiCall->makeRequest('post', '/collections/m2...', false, Array)
#2 /var/www/html/vendor/typesense/typesense-php/src/Documents.php(147): Typesense\ApiCall->post('/collections/m2...', '{"objectID":"70...', false, Array)
#3 /var/www/html/vendor/develodesign/magento2-module-typesense/Adapter/Client.php(97): Typesense\Documents->import(Array, Array)
#4 /var/www/html/vendor/develodesign/magento2-module-typesense/Plugin/Backend/Algolia/AlgoliaSearch/Helper/AlgoliaHelperPlugin.php(63): Develo\Typesense\Adapter\Client->addData('m2_aaronlocal_d...', Array)
#5 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(135): Develo\Typesense\Plugin\Backend\Algolia\AlgoliaSearch\Helper\AlgoliaHelperPlugin->aroundAddObjects(Object(Algolia\AlgoliaSearch\Helper\AlgoliaHelper\Interceptor), Object(Closure), Array, 'm2_aaronlocal_d...')
#6 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Algolia\AlgoliaSearch\Helper\AlgoliaHelper\Interceptor->Magento\Framework\Interception{closure}(Array, 'm2_aaronlocal_d...')
#7 /var/www/html/generated/code/Algolia/AlgoliaSearch/Helper/AlgoliaHelper/Interceptor.php(149): Algolia\AlgoliaSearch\Helper\AlgoliaHelper\Interceptor->___callPlugins('addObjects', Array, NULL)
#8 /var/www/html/vendor/algolia/algoliasearch-magento-2/Helper/Data.php(517): Algolia\AlgoliaSearch\Helper\AlgoliaHelper\Interceptor->addObjects(Array, 'm2_aaronlocal_d...')
#9 /var/www/html/generated/code/Algolia/AlgoliaSearch/Helper/Data/Interceptor.php(122): Algolia\AlgoliaSearch\Helper\Data->rebuildStoreSuggestionIndexPage(10, Object(Magento\Search\Model\ResourceModel\Query\Collection\Interceptor), 1, 300)
#10 /var/www/html/vendor/algolia/algoliasearch-magento-2/Helper/Data.php(376): Algolia\AlgoliaSearch\Helper\Data\Interceptor->rebuildStoreSuggestionIndexPage(10, Object(Magento\Search\Model\ResourceModel\Query\Collection\Interceptor), 1, 300)
#11 /var/www/html/generated/code/Algolia/AlgoliaSearch/Helper/Data/Interceptor.php(77): Algolia\AlgoliaSearch\Helper\Data->rebuildStoreSuggestionIndex(10)
#12 [internal function]: Algolia\AlgoliaSearch\Helper\Data\Interceptor->rebuildStoreSuggestionIndex(10)
#13 /var/www/html/vendor/algolia/algoliasearch-magento-2/Model/Job.php(76): call_user_func_array(Array, Array)
#14 /var/www/html/vendor/algolia/algoliasearch-magento-2/Model/Queue.php(226): Algolia\AlgoliaSearch\Model\Job->execute()
#15 /var/www/html/vendor/algolia/algoliasearch-magento-2/Model/Queue.php(311): Algolia\AlgoliaSearch\Model\Queue->processJob(Object(Algolia\AlgoliaSearch\Model\Job))
#16 /var/www/html/vendor/algolia/algoliasearch-magento-2/Model/Queue.php(195): Algolia\AlgoliaSearch\Model\Queue->run(8)
#17 /var/www/html/vendor/algolia/algoliasearch-magento-2/Model/Indexer/QueueRunner.php(55): Algolia\AlgoliaSearch\Model\Queue->runCron()
#18 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Algolia\AlgoliaSearch\Model\Indexer\QueueRunner->executeFull()
#19 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Algolia\AlgoliaSearch\Model\Indexer\QueueRunner\Interceptor->___callParent('executeFull', Array)
#20 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Algolia\AlgoliaSearch\Model\Indexer\QueueRunner\Interceptor->Magento\Framework\Interception{closure}()
#21 /var/www/html/generated/code/Algolia/AlgoliaSearch/Model/Indexer/QueueRunner/Interceptor.php(32): Algolia\AlgoliaSearch\Model\Indexer\QueueRunner\Interceptor->___callPlugins('executeFull', Array, Array)
#22 /var/www/html/vendor/magento/module-indexer/Model/Indexer.php(443): Algolia\AlgoliaSearch\Model\Indexer\QueueRunner\Interceptor->executeFull()
#23 /var/www/html/generated/code/Magento/Indexer/Model/Indexer/Interceptor.php(230): Magento\Indexer\Model\Indexer->reindexAll()
#24 /var/www/html/vendor/magento/module-indexer/Model/Indexer/DependencyDecorator.php(259): Magento\Indexer\Model\Indexer\Interceptor->reindexAll()
#25 /var/www/html/vendor/magento/module-indexer/Console/Command/IndexerReindexCommand.php(110): Magento\Indexer\Model\Indexer\DependencyDecorator->reindexAll()
#26 /var/www/html/vendor/symfony/console/Command/Command.php(255): Magento\Indexer\Console\Command\IndexerReindexCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Indexer\Console\Command\IndexerReindexCommand\Interceptor->___callParent('run', Array)
#29 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Indexer\Console\Command\IndexerReindexCommand\Interceptor->Magento\Framework\Interception{closure}(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#30 /var/www/html/generated/code/Magento/Indexer/Console/Command/IndexerReindexCommand/Interceptor.php(86): Magento\Indexer\Console\Command\IndexerReindexCommand\Interceptor->___callPlugins('run', Array, Array)
#31 /var/www/html/vendor/symfony/console/Application.php(1021): Magento\Indexer\Console\Command\IndexerReindexCommand\Interceptor->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#32 /var/www/html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Indexer\Console\Command\IndexerReindexCommand\Interceptor), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#33 /var/www/html/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#34 /var/www/html/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 /var/www/html/bin/magento(23): Symfony\Component\Console\Application->run()
#36 {main}
7 jobs processed in 5 seconds.
has been rebuilt successfully in 00:00:04
Algolia Search - Delete inactive products index has been rebuilt successfully in 00:00:00
$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant