Sync data for specific store view using command line

From version 2.1.19 sync process can be done per store view.

Follow the steps below :

  1. Without signing in into Magento Admin Panel, please execute below command to get list of all store codes of website.
    <path to php binary> <magento install dir>/bin/magento klevu:syncstore:storecode list
  2. Please execute below command to sync data using the store codes obtained.
     <path to php binary> <magento install dir>/bin/magento klevu:syncstore:storecode  "Comma separated store views code"
    

    Example : php bin/magento klevu:syncstore:storecode english,default,french

Only store codes that are part of one website can be run in a single process. Please set up commands for each website using the list that is returned from klevu:syncstore:storecode list
Example :

Website1 : php bin/magento klevu:syncstore:storecode default,french
Website2 : php bin/magento klevu:syncstore:storecode german

Note : If you get any error during sync and you want to run command again then you need to clear lock file (example: klevu_search_english.lock ) from <magento install dir>/var directory.