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

Empty query processed during indexation #118

Closed
romainruaud opened this issue Sep 16, 2016 · 0 comments · Fixed by #119
Closed

Empty query processed during indexation #118

romainruaud opened this issue Sep 16, 2016 · 0 comments · Fixed by #119
Assignees
Milestone

Comments

@romainruaud
Copy link
Collaborator

Thanks to @southerncomputer I can confirm that there are queries processed with entity_id IN (NULL) clauses during index process.

Queries are looking like this in the query log :

## 2016-09-16 09:13:42
## 16820 ## QUERY
SQL: SELECT `t_default`.`entity_id`, `t_default`.`attribute_id`, COALESCE(t_store.value, t_default.value) AS `value` FROM `catalog_product_entity_decimal` AS `t_default`
 LEFT JOIN `catalog_product_entity_decimal` AS `t_store` ON t_default.entity_id = t_store.entity_id AND t_default.attribute_id = t_store.attribute_id AND t_store.store_id= 3 WHERE (t_default.store_id=0) AND (t_default.attribute_id IN (156)) AND (t_default.entity_id IN (NULL))
AFF: 0
TIME: 0.0017

This occurs on https://github.com/Smile-SA/elasticsuite/blob/master/src/module-elasticsuite-catalog/Model/Product/Indexer/Fulltext/Datasource/AttributeData.php#L46

The cause is there is no parent-child relation for the concerned products. Therefore, $allChildrenIds is empty and cause the useless request to be sent.

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

Successfully merging a pull request may close this issue.

1 participant