sh 截断Acquia SOLR核心

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 截断Acquia SOLR核心相关的知识,希望对你有一定的参考价值。

# D7 Search API Solr or apachesolr.module
drush --uri=[domain] ev '
  // Get Solr.
  function XX_get_solr() {
    $solr = false;
    if (function_exists("apachesolr_get_solr")) {
      // apachesolr.module
      $solr = apachesolr_get_solr();
    }
    elseif (function_exists("search_api_server_load")) {
      // search_api_solr.module
      $servers = search_api_server_load_multiple(FALSE, array("class" => "acquia_search_service"));
      foreach ($servers as $server_id => $server_data) { break; }
      $solr = search_api_server_load($server_id)->getSolrConnection();
    }
    return $solr;
  }
  $solr = XX_get_solr();
  # EDIT THIS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  # REALLY! :)
  ## REPLACE "solrfieldname:solrfieldvalue" WITH "*:*" TO DELETE EVERYTHING
  $solr->deleteByQuery("solrfieldname:solrfieldvalue");
'

以上是关于sh 截断Acquia SOLR核心的主要内容,如果未能解决你的问题,请参考以下文章

sh Flush Acquia memcache

如何将 solr 字符串字段截断为 10 个字符?

sh solr-provision.sh

php Acquia D7示例Memcache配置

php Acquia D8 Memcache示例配置

markdown Acquia搜索设置 - BLT / DrupalVM等