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

catalogsearch_fulltext_scope(ID) tables are not created #39

Closed
csdougliss opened this issue Jan 6, 2016 · 4 comments
Closed

catalogsearch_fulltext_scope(ID) tables are not created #39

csdougliss opened this issue Jan 6, 2016 · 4 comments

Comments

@csdougliss
Copy link

After running the data migration tool the store catalogsearch_fulltext_scope(ID) tables are not created resulting in the following exception when viewing the front end:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento2_prod.catalogsearch_fulltext_scope3' doesn't exist, query was: INSERT INTO `search_tmp_568be23e4effb4_02259989` SELECT `main_select`.`entity_id`, MAX(score) AS `relevance` FROM (SELECT `search_index`.`entity_id`, ((0) + LEAST((MATCH (data_index) AGAINST ('sale*' IN BOOLEAN MODE)), 1000000) * POW(2, search_weight)) AS `score` FROM `catalogsearch_fulltext_scope3` AS `search_index`
 LEFT JOIN `catalog_eav_attribute` AS `cea` ON search_index.attribute_id = cea.attribute_id WHERE (MATCH (data_index) AGAINST ('sale*' IN BOOLEAN MODE))) AS `main_select` GROUP BY `entity_id` ORDER BY `relevance` DESC LIMIT 10000
@csdougliss csdougliss changed the title atalogsearch_fulltext_scope(ID) tables are not created catalogsearch_fulltext_scope(ID) tables are not created Jan 6, 2016
@csdougliss
Copy link
Author

Fixed, not being created with php 7

@davetbo
Copy link

davetbo commented Jan 11, 2016

I'm getting something very similar to this.
Magento product creation result: exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mag_owner.mag_catalogsearch_fulltext_scope2' doesn't exist' in /usr/local/zend/var/apps/http/mydomain/80/docroot/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228

I get this when I try to use the rest/V1/products API like this:
$testdata = json_encode(array('product' => array('sku' => 'testsku', 'name' => 'test API name', 'attribute_set_id' => 4, 'price' => 19.99, 'status' => 1, 'type_id' => 'simple', 'weight' => 1)));
$url = 'http://mydomain/rest/V1/products'
$authHeader = $this->oAuthClientService->buildAuthorizationHeaderForAPIRequest(
'POST',
new Uri($url),
unserialize($this->oAuthKeyService->findKeyByIdAndOwner('magento', 1)->getAccessToken())
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, $testdata);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($testdata),
'Authorization: ' . $authHeader
));;
$result = curl_exec($ch);

I'm using Magento 2.0.0 and I'm calling this API from another application I'm developing. I'm not using any migration tool, by the way, but this is the only place Google could find anything resembling this error. A bit ago I was getting catalogsearch_fulltext_scope6 instead of catalogsearch_fulltext_scope2 for some reason. I reset my database (from an export I did right after originally installing it) and now I"m getting the 2 instead of the 6. Please advise. I appreciate your help! :)

@omarsalman
Copy link

Hi!

I'm getting the exact same issue as @davetbo

exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento2i.catalogsearch_fulltext_scope2' doesn't exist' in C:\Program Files\wamp\www\magento2i\vendor\magento\zendframework1\library\Zend\Db\Statement\Pdo.php:228

I was creating a product from the admin interface AFTER migrating from a 1.9.2 installation using the migration tool. Maybe the update in the data migration tool (magento/magento2#2798) will have this fixed?

Thanks!

@davetbo
Copy link

davetbo commented Feb 23, 2016

I figured out that it's because on my new install the index tables had not
been created. Run the indexer and then I think it will resolve itself.

Best,
Dave
On Feb 23, 2016 1:44 AM, "omarsalman" notifications@github.com wrote:

Hi!

I'm getting the exact same issue as @davetbo https://github.com/davetbo

exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view
not found: 1146 Table 'magento2i.catalogsearch_fulltext_scope2' doesn't
exist' in C:\Program
Files\wamp\www\magento2i\vendor\magento\zendframework1\library\Zend\Db\Statement\Pdo.php:228

I was creating a product from the admin interface AFTER migrating from a
1.9.2 installation using the migration tool. Maybe the update in the data
migration tool (magento/magento2#2798
magento/magento2#2798) will have this fixed?

Thanks!


Reply to this email directly or view it on GitHub
#39 (comment)
.

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

3 participants