当前位置: 首页>>代码示例>>PHP>>正文


PHP ArticleSearchIndex::rebuildIndex方法代码示例

本文整理汇总了PHP中ArticleSearchIndex::rebuildIndex方法的典型用法代码示例。如果您正苦于以下问题:PHP ArticleSearchIndex::rebuildIndex方法的具体用法?PHP ArticleSearchIndex::rebuildIndex怎么用?PHP ArticleSearchIndex::rebuildIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ArticleSearchIndex的用法示例。


在下文中一共展示了ArticleSearchIndex::rebuildIndex方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: rebuildSearchIndex

 /**
  * Rebuild the search index.
  * @return boolean
  */
 function rebuildSearchIndex()
 {
     import('classes.search.ArticleSearchIndex');
     $articleSearchIndex = new ArticleSearchIndex();
     $articleSearchIndex->rebuildIndex();
     return true;
 }
开发者ID:laelnasan,项目名称:UTFPR-ojs,代码行数:11,代码来源:Upgrade.inc.php

示例2: execute

 /**
  * Rebuild the search index for all articles in all journals.
  */
 function execute()
 {
     // If we have an argument that this must be a journal path.
     $journal = null;
     if (count($this->argv)) {
         $journalPath = array_shift($this->argv);
         $journalDao =& DAORegistry::getDAO('JournalDAO');
         $journal =& $journalDao->getJournalByPath($journalPath);
         if (!$journal) {
             die(__('search.cli.rebuildIndex.unknownJournal', array('journalPath' => $journalPath)) . "\n");
         }
     }
     // Register a router hook so that we can construct
     // useful URLs to journal content.
     HookRegistry::register('Request::getBaseUrl', array(&$this, 'callbackBaseUrl'));
     // Let the search implementation re-build the index.
     $articleSearchIndex = new ArticleSearchIndex();
     $articleSearchIndex->rebuildIndex(true, $journal);
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:22,代码来源:rebuildSearchIndex.php

示例3: execute

 /**
  * Rebuild the search index for all articles in all journals.
  */
 function execute()
 {
     // Check whether we have (optional) switches.
     $switches = array();
     while (count($this->argv) && substr($this->argv[0], 0, 1) == '-') {
         $switches[] = array_shift($this->argv);
     }
     // If we have another argument that this must be a journal path.
     $journal = null;
     if (count($this->argv)) {
         $journalPath = array_shift($this->argv);
         $journalDao = DAORegistry::getDAO('JournalDAO');
         $journal = $journalDao->getByPath($journalPath);
         if (!$journal) {
             die(__('search.cli.rebuildIndex.unknownJournal', array('journalPath' => $journalPath)) . "\n");
         }
     }
     // Register a router hook so that we can construct
     // useful URLs to journal content.
     HookRegistry::register('Request::getBaseUrl', array($this, 'callbackBaseUrl'));
     // Let the search implementation re-build the index.
     $articleSearchIndex = new ArticleSearchIndex();
     $articleSearchIndex->rebuildIndex(true, $journal, $switches);
 }
开发者ID:laelnasan,项目名称:UTFPR-ojs,代码行数:27,代码来源:rebuildSearchIndex.php

示例4: execute

 /**
  * Rebuild the search index for all articles in all journals.
  */
 function execute()
 {
     ArticleSearchIndex::rebuildIndex(true);
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:7,代码来源:rebuildSearchIndex.php

示例5: rebuildSearchIndex

 /**
  * Rebuild the article search index.
  * Note: Rebuilds index for _all_ journals (non-optimal, but shouldn't be a problem)
  * Based on code from tools/rebuildSearchIndex.php
  */
 function rebuildSearchIndex()
 {
     if ($this->hasOption('verbose')) {
         printf("Rebuilding search index\n");
     }
     ArticleSearchIndex::rebuildIndex();
 }
开发者ID:Jouper,项目名称:jouper,代码行数:12,代码来源:ImportOJS1.inc.php

示例6: rebuildSearchIndex

 /**
  * Rebuild the search index.
  * @return boolean
  */
 function rebuildSearchIndex()
 {
     import('classes.search.ArticleSearchIndex');
     ArticleSearchIndex::rebuildIndex();
     return true;
 }
开发者ID:reconciler,项目名称:ojs,代码行数:10,代码来源:Upgrade.inc.php

示例7: testRebuildIndexViaPluginHook

 /**
  * @covers ArticleSearchIndex
  */
 public function testRebuildIndexViaPluginHook()
 {
     // Diverting to the search plugin hook.
     HookRegistry::register('ArticleSearchIndex::rebuildIndex', array($this, 'callbackRebuildIndex'));
     // Test log output.
     $this->expectOutputString("Some log message from the plug-in.");
     // Simulate rebuilding the index via hook.
     $articleSearchIndex = new ArticleSearchIndex();
     $articleSearchIndex->rebuildIndex(true);
     // With log
     $articleSearchIndex->rebuildIndex(false);
     // Without log (that's why we expect the log message to appear only once).
     // Remove the test hook.
     HookRegistry::clear('ArticleSearchIndex::rebuildIndex');
 }
开发者ID:mosvits,项目名称:ojs,代码行数:18,代码来源:ArticleSearchIndexTest.php


注:本文中的ArticleSearchIndex::rebuildIndex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。