theoden LiteCart Fan From France Member since Jan 2015 theoden Apr 14 2017 12:08 PM Hi TIM.You've commited a new version of search page, but I'm afraid it doesn't work, or not as expected for me. Perhaps something goes wrong in my meta keywords or anything, but new search doesn't find anything... no errors, just nothing. Whatever I click a (by name, by price etc) Why ? The previous search works perfectly. Ouch, sorry.
tim Founder From Sweden Member since May 2013 tim Apr 14 2017 03:16 PM Sounds troubling, we need to find out why.Cannot verify in sandboxhttp://sandbox.litecart.net/en/search?query=Duck+green
theoden LiteCart Fan From France Member since Jan 2015 theoden Apr 14 2017 03:31 PM I must admit I've verified in sandbox, that seems to work, but not in my shop. There's no result, that's the reason why I'm asking.Perhaps some infos miss in produtcts, possible.
tim Founder From Sweden Member since May 2013 tim Apr 14 2017 04:00 PM Make sure the products have name and description for the selected language.
theoden LiteCart Fan From France Member since Jan 2015 theoden Apr 14 2017 04:48 PM They have, unique id, name of course, description in english and french of course. You know it, you've already had a look at my shop.
tim Founder From Sweden Member since May 2013 tim Apr 14 2017 05:03 PM I went to http://laurentsailla.fr/shop-2.0/fr/ but assume you have the old search component there.Could you delegate FTP access and let me debug?https://www.litecart.net/support
theoden LiteCart Fan From France Member since Jan 2015 theoden Apr 14 2017 06:23 PM In fact, I haven't told anyone : http://laurentsailla.fr/shop-2.0/fr/ is a test branch. I don't use it any more for the moment, as I assumed to work with a beta release on my production website.The url is :http://www.toile-popart.comBut for search, the problem stays the same, I've put back the older version of pages/search.inc.php.I must verify but I can't create 2 FTP accounts with this web account, nor delegate. I can only access FTP with my own login-password and I don't really want to give it to anyone. I'm brainstorming, I'm searching for a solution, please wait.I think I'm going to duplicate my full workshop database on http://www.laurentsailla.fr/shop-2.0/ and there you'll be able to have access.But it needs some preparation, as you must guess.And I will create another admin account in my webshop for you.I suppose you'd rather use the default template of litecart.
tim Founder From Sweden Member since May 2013 tim Apr 21 2017 10:47 PM I just stumbled upon the same issue. Debugging it shows that mysql returned a negative match value:match(p.code, p.sku, p.gtin, pi.name, pi.short_description, pi.description, m.name) against ('search string' in boolean mode) as relevance'relevance' => (int) -2I am searching for a solution.
tim Founder From Sweden Member since May 2013 tim Apr 21 2017 11:21 PM It turns out that if there is no manufacturer, mysql returns -2. If we skip manufacturer name from the query it works for me.In pages/search.inc.php**Find**match(p.code, p.sku, p.gtin, pi.name, pi.short_description, pi.description, m.name) against ('". database::input($_GET['query']) ."' in boolean mode) as relevance**Replace with**match(p.code, p.sku, p.gtin, pi.name, pi.short_description, pi.description) against ('". database::input($_GET['query']) ."' in boolean mode) as relevancehttps://github.com/litecart/litecart/issues/64
theoden LiteCart Fan From France Member since Jan 2015 theoden Apr 21 2017 11:57 PM Seems to do the job. Thanx.I was not far from your solution, I had founded that the problem was with the sql queries.In fact, I do not have (and do'nt need) any manufacturer, that's right.
Deleted From Unknown May 26 2018 01:37 PM Hi, is it possible that this problem is still there in 2.1.1? I'm getting wrong results on 3 letter searches, min_length on server is set at 4.
tim Founder From Sweden Member since May 2013 tim May 28 2018 11:38 PM @user3549 I am uncertain. What happens if you decrease min_length ?
Deleted From Unknown May 29 2018 09:38 AM Hi Tim, as LiteCart is so lightweight, it's hosted on an ordinary shared hosting, meaning I can't change settings like this. I there a way around? Old search worked fine, also search in admin panel is working as it should. Thank you.
tim Founder From Sweden Member since May 2013 tim May 29 2018 01:46 PM @user3549 It turns out the setting ft_min_word_len (not min_length) is not possible to change as a session variable.I think you need to go back to the old syntax, not using the fulltext search technology. This will loose the benefits of fulltext and leave exact phrase matching only. Download an older version of LiteCart and see search.inc.php.
Deleted From Unknown May 29 2018 04:40 PM Yes, that could be done, but it is a major drwaback for whole 2.X versions range, as search is not working properly. Probably majority of sites, that us LiteCart, are small business, hosted on shared hostings, and can not manipulate MySQL settings. Maybe revert everything to old search?