Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

ufk

Newbie
  
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ufk's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Так.. Сейчас я постараюсь объяснить что я понимаю в этом коде: это: $sphinx = new SphinxClient; - понятно $sphinx->setServer('hostname',9999); - соединяемся со сфинксом $mode = (strpos($keyword,'"') !== false ? SPH_MATCH_PHRASE : SPH_MATCH_ANY); - поисковы запрос как понимаю $sphinx->setMatchMode($mode); - понятно $sphinx->setMaxQueryTime(100); - это понятно $sphinx->setLimits(0,2000,0,0); - это тоже $results = $sphinx->query($keyword,'getProductsByTitle'); - получаем результаты тоесть я скорее вообще не понимаю что с этим кодом делать, точнее как "этим кодом" заменить поиск опенкарта.
  2. Собственно решил прикрутить к магазину sphinx на замену стандартного поиска. С установкой и настройкой самого sphinx-са проблем ноль, но вот как вывести результаты в самом opencart-те к сожалению разбраться не получилось...все что нашел: Next the Opencart product model code needs to be altered to use Sphinx rather than querying the MySQL database directly -- below is an example:- $sphinx = new SphinxClient; // Instantiate PECL client $sphinx->setServer('hostname',9999); // Hostname and port number that searchd is listening on $mode = (strpos($keyword,'"') !== false ? SPH_MATCH_PHRASE : SPH_MATCH_ANY); // See if a phrase is being searched for $sphinx->setMatchMode($mode); $sphinx->setMaxQueryTime(100); $sphinx->setLimits(0,2000,0,0); // Get results from sphinx $results = $sphinx->query($keyword,'getProductsByTitle'); $results['matches'] will contain an array of product ID values of all the matching products so when the Opencart query is issued the query's 'WHERE' clause should have added 'AND product.product_id IN (999,999,999) where 999 is the imploded list of IDs returned from Sphinx. There is also a command line tool (bin/search) supplied with Sphinx to test search queries. отсюда - http://forum.opencart.com/viewtopic.php?t=18297 Собственно вопрос, может кто уже делал, подскажите где и что править в самом opencart-е(точнее даж так, куда воткнуть этот самый вызов sphinx-а дабы заменить оным встроенный поиск)? Спасибо.
  3. я проверил, от выпила кеша из seo_url с точки зрения нагрузки ничего не изменяется. а мемкешед и мускулькешед примерно в 2 раза снизили нагрузку..
  4. Не знаю туда ли написал, если что прошу перенести в нужный раздел. Проблема такова, ЧПУ не работает при использовании memcached, ocStore 0.2.0. В конфиг добавлено: define('CACHE_DRIVER', 'memcached'); define('MEMCACHE_HOSTNAME', 'localhost'); define('MEMCACHE_PORT', '11211'); define('MEMCACHE_NAMESPACE', 'opencartblabla'); https://opencartforum.com/files/file/59-memcache-support/ Может кто сталкивался, подскажите куда копать?(я так понимаю корень проблемы лежит в /catalog/model/tool/url_seo.php) Спасибо. Разобрался, проблема действительно была /catalog/model/tool/url_seo.php, выпилил от туда кеширование и все заработало.
Guest
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.