Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过SSH在magento上重新索引数据_Magento - Fatal编程技术网

通过SSH在magento上重新索引数据

通过SSH在magento上重新索引数据,magento,Magento,我尝试在magento上通过ssh重新编制数据索引,因此我登录到ssh并键入以下命令: php -f indexer.php reindexall 我也试过这个: php indexer.php reindexall 但是什么也没发生。它返回以下内容: Usage: php -f indexer.php -- [options] --status <indexer> Show Indexer(s) Status --mode <in

我尝试在magento上通过ssh重新编制数据索引,因此我登录到ssh并键入以下命令:

php -f indexer.php reindexall
我也试过这个:

php indexer.php reindexall
但是什么也没发生。它返回以下内容:

    Usage:  php -f indexer.php -- [options]

  --status <indexer>            Show Indexer(s) Status
  --mode <indexer>              Show Indexer(s) Index Mode
  --mode-realtime <indexer>     Set index mode type "Update on Save"
  --mode-manual <indexer>       Set index mode type "Manual Update"
  --reindex <indexer>           Reindex Data
  info                          Show allowed indexers
  reindexall                    Reindex Data by all indexers
  help                          This help

  <indexer>     Comma separated indexer codes or value "all" for all indexers

但是它仍然返回与上面所示相同的内容。

答案在您的问题中,即:

Usage:  php -f indexer.php -- [options]

  --status <indexer>            Show Indexer(s) Status
  --mode <indexer>              Show Indexer(s) Index Mode
  --mode-realtime <indexer>     Set index mode type "Update on Save"
  --mode-manual <indexer>       Set index mode type "Manual Update"
  --reindex <indexer>           Reindex Data
  info                          Show allowed indexers
  reindexall                    Reindex Data by all indexers
  help                          This help

  <indexer>     Comma separated indexer codes or value "all" for all indexers


重要信息:您必须从Magento的根目录执行此命令

虽然此答案可能是正确且有用的,但最好随附一些解释,以解释它如何帮助解决问题。如果有变化(可能无关)导致它停止工作,并且用户需要了解它曾经是如何工作的,那么这在将来会变得特别有用。@TasawerKhan奇怪,我每天都使用它,而且它总是工作的。执行时是否在MAGENTO_根目录下?它是否给出任何错误消息?你应该提供一些信息:说“它不起作用”不允许我帮助你。谢谢你的否决票是的。这是非常奇怪的考虑到用法帮助建议相同。它显示了这个使用信息这可能是字符编码问题吗?你找到答案了吗?
Usage:  php -f indexer.php -- [options]

  --status <indexer>            Show Indexer(s) Status
  --mode <indexer>              Show Indexer(s) Index Mode
  --mode-realtime <indexer>     Set index mode type "Update on Save"
  --mode-manual <indexer>       Set index mode type "Manual Update"
  --reindex <indexer>           Reindex Data
  info                          Show allowed indexers
  reindexall                    Reindex Data by all indexers
  help                          This help

  <indexer>     Comma separated indexer codes or value "all" for all indexers
php -f shell/indexer.php -- reindexall
php -f shell/indexer.php -- --reindex all