tamara_gl Posted March 21, 2013 Share Posted March 21, 2013 Hi, I have version 1.5.3 of Prestashop and the search engine doesn't work. I have tried various solutions proposed forum earlier but none works. The search don't find any products from my store. Any idea who might be failing? I try some options of Preferences>Search Thanks. Link to comment Share on other sites More sharing options...
NemoPS Posted March 21, 2013 Share Posted March 21, 2013 Hi, It might seem obvious but it's overlooked at times, have you tried reindexing prices? Are they all indexed? Link to comment Share on other sites More sharing options...
tamara_gl Posted March 21, 2013 Author Share Posted March 21, 2013 Yes, I tried reindexing products and, but are not all. Products must have a specific filled field for reindexing it? The products I have in prestashop are products migrated from other website. Link to comment Share on other sites More sharing options...
NemoPS Posted March 21, 2013 Share Posted March 21, 2013 So, basically you're missing some where it lists the number of indexed products? Link to comment Share on other sites More sharing options...
tamara_gl Posted March 21, 2013 Author Share Posted March 21, 2013 Yes, for this reason I know missing products. Link to comment Share on other sites More sharing options...
NemoPS Posted March 21, 2013 Share Posted March 21, 2013 Are you using any special character in descriptions/names for some of the ones which are not indexed' try setting to 0 the weight for everything but product names, then reindex, and add the other ones back one by one. You'll see which one is causing the problem...if that's not in the products' name! Link to comment Share on other sites More sharing options...
shacker Posted March 21, 2013 Share Posted March 21, 2013 you get some javascript error on your site, check in google chrome console Link to comment Share on other sites More sharing options...
tamara_gl Posted March 21, 2013 Author Share Posted March 21, 2013 I check Console in Chrome and i don't have any error when I search. All request return 200 OK, but empty. My products are in spanish. I setting to 0 the weight for everything but product names, but i don't retrieve any result when I search some product. Link to comment Share on other sites More sharing options...
NemoPS Posted March 22, 2013 Share Posted March 22, 2013 Have you tried disabling the ajax search? Indeed there are problems in indexation too, but you should at least be able to get the ones that are indexed Link to comment Share on other sites More sharing options...
tamara_gl Posted March 22, 2013 Author Share Posted March 22, 2013 (edited) I tried disable ajax and set all weight to 0 (except names of products) and after reindexing products and nothing. Search box don't return any result. I created a new product and I tried one more time, and the same result. Any idea more? Thanks a lot. Edited March 22, 2013 by tamara_gl (see edit history) Link to comment Share on other sites More sharing options...
shacker Posted March 22, 2013 Share Posted March 22, 2013 really strange site url? Link to comment Share on other sites More sharing options...
tamara_gl Posted March 22, 2013 Author Share Posted March 22, 2013 superjamon.es Link to comment Share on other sites More sharing options...
shacker Posted March 22, 2013 Share Posted March 22, 2013 try to upload the blocksearch module again, and upload the search.php, and the classes/search.php, classes/searchengine.php Link to comment Share on other sites More sharing options...
tamara_gl Posted March 22, 2013 Author Share Posted March 22, 2013 The files are correct, in fact I made a test: If I change the database to the original prestashop database search box works. I believe that migrated my shop to prestashop, products fields have not completed and causes a failure in the search query. But I don't find what may be missing. I did migration by importing a csv prestashop tool. Link to comment Share on other sites More sharing options...
shacker Posted March 25, 2013 Share Posted March 25, 2013 if you regenerate the search index the process finish? Link to comment Share on other sites More sharing options...
tamara_gl Posted March 26, 2013 Author Share Posted March 26, 2013 @shacker, yes. Link to comment Share on other sites More sharing options...
shacker Posted March 26, 2013 Share Posted March 26, 2013 in phpmy admin, check if this tables have data _search_index _search_word Link to comment Share on other sites More sharing options...
tamara_gl Posted March 26, 2013 Author Share Posted March 26, 2013 Yes, both tables have data search_index: ~20,827 rows search_word: ~2,811 rows Link to comment Share on other sites More sharing options...
shacker Posted March 29, 2013 Share Posted March 29, 2013 strange. I see this issue on sites with ps 1.5.3, try to upload to ps 1.5.4 Link to comment Share on other sites More sharing options...
tamara_gl Posted April 10, 2013 Author Share Posted April 10, 2013 (edited) I think I found the error. I need the solution. The error is that ps_search_word table just have the id_lang = 1. Is there an option in prestashop indicating that indexes in all languages? Edited April 10, 2013 by tamara_gl (see edit history) Link to comment Share on other sites More sharing options...
tamara_gl Posted April 10, 2013 Author Share Posted April 10, 2013 Ok, after studying the flow of how indexes prestashop products, I have the following conclusion: In classes / search.php We use the following method: protected static function getProductsToIndex($total_languages, $id_product = false, $limit = 50) { // Adjust the limit to get only "whole" products, in every languages (and at least one) $max_possibilities = $total_languages * count(Shop::getShops(true)); $limit = max($max_possibilities, floor($limit / $max_possibilities) * $max_possibilities); return Db::getInstance()->executeS(' SELECT p.id_product, pl.id_lang, pl.id_shop, pl.name pname, p.reference, p.ean13, p.upc, pl.description_short, pl.description, cl.name cname, m.name mname FROM '._DB_PREFIX_.'product p LEFT JOIN '._DB_PREFIX_.'product_lang pl ON p.id_product = pl.id_product '.Shop::addSqlAssociation('product', 'p').' LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (cl.id_category = product_shop.id_category_default AND pl.id_lang = cl.id_lang AND cl.id_shop = product_shop.id_shop) LEFT JOIN '._DB_PREFIX_.'manufacturer m ON m.id_manufacturer = p.id_manufacturer WHERE product_shop.indexed = 0 AND product_shop.visibility IN ("both", "search") '.($id_product ? 'AND p.id_product = '.(int)$id_product : '').' LIMIT '.(int)$limit ); } In this method my variables have these values: $limit = 50; $max_possibilities = 112; After that: $limit = max($max_possibilities, floor($limit / $max_possibilities) * $max_possibilities); My $limit = 1. And then, the follow query have a LIMIT 1. And get a products only with first id_lang (id_lang = 1). If the limit is 4 get 4 a product with 4 languages. Is a bug? or something in my database is wrong? Link to comment Share on other sites More sharing options...
td-hans Posted June 4, 2013 Share Posted June 4, 2013 My search box doesn't work either. The company that input my products is asking for "the exact field name and value to set for that field" and "which database field to update". I am clueless. Please help. Takia shop.mylittletoychest.com (adult content) Link to comment Share on other sites More sharing options...
vekia Posted June 4, 2013 Share Posted June 4, 2013 @td-hans i checked your website and search tool works well, your problem is solved? Link to comment Share on other sites More sharing options...
td-hans Posted June 4, 2013 Share Posted June 4, 2013 Amazing! I did speak with a tech rep at my hosting company this morning but she said she couldn't figure it out. Maybe she did better than she thought. However, it doesn't work very well. I tried about 8 different searches, but only 3 returned results. How can I improve the accuracy? Link to comment Share on other sites More sharing options...
vekia Posted June 4, 2013 Share Posted June 4, 2013 maybe you have to rebuild search index under the preferences > search tab in your BO ? Link to comment Share on other sites More sharing options...
td-hans Posted June 4, 2013 Share Posted June 4, 2013 So if I just click on the link to set the cron job, it will remove everything and put back?? I'm just asking before I try. I don't want to loose over 3100 products. Link to comment Share on other sites More sharing options...
vekia Posted June 4, 2013 Share Posted June 4, 2013 yes, you can also do it in BO, preferences > search, you can also backup your database if you want Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now