swissup / module-search-mysql-legacy

102 stars 32 forks source link

issue with index building and search #10

Closed devhero-tech closed 2 years ago

devhero-tech commented 2 years ago

Hi, after instal and few tries of reindex on search. It looks like reindex can't create tables. Reindexing on 2000 products takes less than 1s ;) I've got error like this:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.catalogsearch_fulltext_scope1' doesn't exist, query was: INSERT INTOsearch_tmp_632cc6ff9ef500_89290962SELECTmain_select.entity_id, SUM(score) ASrelevanceFROM (SELECT DISTINCTeav_index.entity_id, (((0)) * 1 + LEAST((MATCH (data_index) AGAINST ('age*' IN BOOLEAN MODE)), 1000000) * POW(2, search_weight)) ASscoreFROMcatalog_product_index_eavASeav_index INNER JOINcatalogsearch_fulltext_scope1ASsearch_indexON eav_index.entity_id = search_index.entity_id INNER JOINcatalog_eav_attributeASceaON search_index.attribute_id = cea.attribute_id INNER JOINcataloginventory_stock_statusASstock_indexON stock_index.product_id = eav_index.entity_id ANDstock_index.website_id= 0 ANDstock_index.stock_status= 1 ANDstock_index.stock_id= 1 WHERE (eav_index.store_id = '1') AND (eav_index.attribute_id= 99 ANDeav_index.valuein ('3', '4') ANDeav_index.store_id= '1') AND (MATCH (data_index) AGAINST ('age*' IN BOOLEAN MODE))) ASmain_selectGROUP BYentity_id Exception #1 (Zend_Db_Statement_Exception): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.catalogsearch_fulltext_scope1' doesn't exist, query was: INSERT INTOsearch_tmp_632cc6ff9ef500_89290962SELECTmain_select.entity_id, SUM(score) ASrelevanceFROM (SELECT DISTINCTeav_index.entity_id, (((0)) * 1 + LEAST((MATCH (data_index) AGAINST ('age*' IN BOOLEAN MODE)), 1000000) * POW(2, search_weight)) ASscoreFROMcatalog_product_index_eavASeav_index INNER JOINcatalogsearch_fulltext_scope1ASsearch_indexON eav_index.entity_id = search_index.entity_id INNER JOINcatalog_eav_attributeASceaON search_index.attribute_id = cea.attribute_id INNER JOINcataloginventory_stock_statusASstock_indexON stock_index.product_id = eav_index.entity_id ANDstock_index.website_id= 0 ANDstock_index.stock_status= 1 ANDstock_index.stock_id= 1 WHERE (eav_index.store_id = '1') AND (eav_index.attribute_id= 99 ANDeav_index.valuein ('3', '4') ANDeav_index.store_id= '1') AND (MATCH (data_index) AGAINST ('age*' IN BOOLEAN MODE))) ASmain_selectGROUP BYentity_id Exception #2 (PDOException): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.catalogsearch_fulltext_scope1' doesn't exist

0m3r commented 2 years ago

what is your Magento version? what are the config options?

bin/magento config:show catalog/search/enable_eav_indexer 
bin/magento config:show catalog/search/engine             

I've got an error like this:

Where is your get/find the error? at some log file(s), frontend, indexing processes, etc.

0m3r commented 2 years ago

related https://github.com/swissup/module-search-mysql-legacy/issues/9

0m3r commented 2 years ago

Possible solution

https://github.com/magento/magento2/issues/26520 https://github.com/magento/magento2/pull/26803/files

0m3r commented 2 years ago

try this release

https://github.com/swissup/module-search-mysql-legacy/releases/tag/1.1.4

composer update swissup/module-search-mysql-legacy

p.s. If doesn't help reopen the issue and give me more information plz