I get an error on my frontend after migrating my database. When I check the logs, I get the following error
{"0":"Notice: Undefined offset: -1 in \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Search\/Dynamic\/Algorithm.php on line 302","1":
"#0 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Search\/Dynamic\/Algorithm.php(302): Magento\\Framework\\App\\ErrorHandler->handler(8, 'Undefined offse...', '\/var\/www\/aslive...', 302, Array)\n
#1 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Search\/Dynamic\/Algorithm.php(179): Magento\\Framework\\Search\\Dynamic\\Algorithm->_findValueSeparator(2, Object(Magento\\Framework\\Search\\Adapter\\Mysql\\Aggregation\\Interval))\n
#2 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Search\/Dynamic\/Algorithm\/Improved.php(70): Magento\\Framework\\Search\\Dynamic\\Algorithm->calculateSeparators(Object(Magento\\Framework\\Search\\Adapter\\Mysql\\Aggregation\\Interval))\n
#3 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Search\/Adapter\/Mysql\/Aggregation\/Builder\/Dynamic.php(56): Magento\\Framework\\Search\\Dynamic\\Algorithm\\Improved->getItems(Object(Magento\\Framework\\Search\\Request\\Aggregation\\DynamicBucket), Array, Object(Magento\\Framework\\Search\\Dynamic\\EntityStorage))\n
#4 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Search\/Adapter\/Mysql\/Aggregation\/Builder.php(106): Magento\\Framework\\Search\\Adapter\\Mysql\\Aggregation\\Builder\\Dynamic->build(Object(Magento\\CatalogSearch\\Model\\Adapter\\Mysql\\Aggregation\\DataProvider\\Interceptor), Array, Object(Magento\\Framework\\Search\\Request\\Aggregation\\DynamicBucket), Object(Magento\\Framework\\DB\\Ddl\\Table))\n
#5 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Search\/Adapter\/Mysql\/Aggregation\/Builder.php(83): Magento\\Framework\\Search\\Adapter\\Mysql\\Aggregation\\Builder->processAggregations(Object(Magento\\Framework\\Search\\Request), Object(Magento\\Framework\\DB\\Ddl\\Table), Array)\n
#6 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Search\/Adapter\/Mysql\/Adapter.php(85): Magento\\Framework\\Search\\Adapter\\Mysql\\Aggregation\\Builder->build(Object(Magento\\Framework\\Search\\Request), Object(Magento\\Framework\\DB\\Ddl\\Table), Array)\n
#7 \/var\/www\/aslive\/app\/code\/Magento\/Search\/Model\/SearchEngine.php(42): Magento\\Framework\\Search\\Adapter\\Mysql\\Adapter->query(Object(Magento\\Framework\\Search\\Request))\n
#8 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Search\/Search.php(72): Magento\\Search\\Model\\SearchEngine->search(Object(Magento\\Framework\\Search\\Request))\n
#9 \/var\/www\/aslive\/app\/code\/Magento\/CatalogSearch\/Model\/ResourceModel\/Fulltext\/Collection.php(359): Magento\\Framework\\Search\\Search->search(Object(Magento\\Framework\\Api\\Search\\SearchCriteria))\n
#10 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Data\/Collection\/AbstractDb.php(342): Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection->_renderFiltersBefore()\n
#11 \/var\/www\/aslive\/app\/code\/Magento\/CatalogSearch\/Model\/ResourceModel\/Fulltext\/Collection.php(410): Magento\\Framework\\Data\\Collection\\AbstractDb->_renderFilters()\n
#12 \/var\/www\/aslive\/app\/code\/Magento\/Eav\/Model\/Entity\/Collection\/AbstractCollection.php(920): Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection->_renderFilters()\n
#13 \/var\/www\/aslive\/app\/code\/Magento\/Catalog\/Model\/ResourceModel\/Product\/Collection.php(790): Magento\\Eav\\Model\\Entity\\Collection\\AbstractCollection->load(false, false)\n
#14 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php(58): Magento\\Catalog\\Model\\ResourceModel\\Product\\Collection->load(false, false)\n
#15 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php(138): Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection\\Interceptor->___callParent('load', Array)\n
#16 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php(153): Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection\\Interceptor->Magento\\Framework\\Interception\\{closure}()\n
#17 \/var\/www\/aslive\/generated\/code\/Magento\/CatalogSearch\/Model\/ResourceModel\/Fulltext\/Collection\/Interceptor.php(26): Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection\\Interceptor->___callPlugins('load', Array, Array)\n
#18 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Data\/Collection.php(832): Magento\\CatalogSearch\\Model\\ResourceModel\\Fulltext\\Collection\\Interceptor->load()\n
#19 \/var\/www\/aslive\/app\/code\/Magiccart\/Magicproduct\/Block\/Product\/ListProduct.php(321): Magento\\Framework\\Data\\Collection->getIterator()\n
#20 \/var\/www\/aslive\/app\/code\/Magento\/PageCache\/Model\/Layout\/LayoutPlugin.php(71): Magiccart\\Magicproduct\\Block\\Product\\ListProduct->getIdentities()\n
#21 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php(146): Magento\\PageCache\\Model\\Layout\\LayoutPlugin->afterGetOutput(Object(Magento\\Framework\\View\\Layout\\Interceptor), '\\n<script>\\n r...')\n
#22 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php(153): Magento\\Framework\\View\\Layout\\Interceptor->Magento\\Framework\\Interception\\{closure}()\n
#23 \/var\/www\/aslive\/generated\/code\/Magento\/Framework\/View\/Layout\/Interceptor.php(39): Magento\\Framework\\View\\Layout\\Interceptor->___callPlugins('getOutput', Array, Array)\n
#24 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/View\/Result\/Page.php(258): Magento\\Framework\\View\\Layout\\Interceptor->getOutput()\n#25 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/View\/Result\/Layout.php(171): Magento\\Framework\\View\\Result\\Page->render(Object(Magento\\Framework\\App\\Response\\Http\\Interceptor))\n#26 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php(58): Magento\\Framework\\View\\Result\\Layout->renderResult(Object(Magento\\Framework\\App\\Response\\Http\\Interceptor))\n#27 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php(138): Magento\\Framework\\View\\Result\\Page\\Interceptor->___callParent('renderResult', Array)\n#28 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Interception\/Interceptor.php(153): Magento\\Framework\\View\\Result\\Page\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Response\\Http\\Interceptor))\n#29 \/var\/www\/aslive\/generated\/code\/Magento\/Framework\/View\/Result\/Page\/Interceptor.php(26): Magento\\Framework\\View\\Result\\Page\\Interceptor->___callPlugins('renderResult', Array, Array)\n#30 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/App\/Http.php(139): Magento\\Framework\\View\\Result\\Page\\Interceptor->renderResult(Object(Magento\\Framework\\App\\Response\\Http\\Interceptor))\n#31 \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/App\/Bootstrap.php(258): Magento\\Framework\\App\\Http->launch()\n#32 \/var\/www\/aslive\/pub\/index.php(37): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))\n#33 {main}","url":"\/","script_name":"\/index.php"}
How can I fix this?