Hi,
Mmm. I'm not able to reproduce the problem on my end and I don't see why the inner join would be a problem either.
The MySQL query does a join between hikashop_product.product_id (p) and hikashop_product.product_parent_id (v) and then a join between hikashop_product.product_id (p) and hikashop_product_category.product_id (pc).
So before applying the where conditions you get in the MySQL memory a table which is a combination of these three tables (+ others we don't care about here), so that you'll get one row for each variant (or one for the product if he doesn't have any). Then, MySQL will apply the conditions and we made is so that it will search in both p.product_code and p.product_name but also v.product_code and v.product_name
So while it's true that due to the inner join, he won't be able to match with the name/code of the variants in p.product_code and p.product_name (since the entries for the variants in p will be removed by the inner join on pc), it will be able to in v.product_name and v.product_code (since the entries for the variants in v will still be there as they first join to p before joining to pc through p).
However, I am able to reproduce the 500 error locally. For that I just need to enter some text which isn't either in a product name/code, nor in a variant name/code, nor in a category name. In that case, $lookup_categories will indeed be empty and the MySQL query will fail.
So I will add some modifications for the next release to remove the 500 error and have instead a soft fail so that no error happen.
Thus, I conclude that you must have been searching for something which isn't set in a variant name/code to get that 500 error. Could you double check ?
Note also that when a variant matches, the + of the product itself is not opened. So it's up to you to open it and select the variant.
That's because the variant support was added at a later point, and it's kind of a patch on the original system and thus it doesn't really support openning the main product and filtering out the non matching variants. That would require quite a bit of modifications to be able to support that and we deemed it as not worth it.