當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Indexer::getIndexedDocumentCount方法代碼示例

本文整理匯總了PHP中Indexer::getIndexedDocumentCount方法的典型用法代碼示例。如果您正苦於以下問題:PHP Indexer::getIndexedDocumentCount方法的具體用法?PHP Indexer::getIndexedDocumentCount怎麽用?PHP Indexer::getIndexedDocumentCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Indexer的用法示例。


在下文中一共展示了Indexer::getIndexedDocumentCount方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: chdir

 */
chdir(realpath(dirname(__FILE__)));
require_once '../config/dmsDefaults.php';
/*
Script checks if open office is running, if it isn't then it attempts to start it.
Windows Vista always returns false if we try and check the host and port
so for windows we use the win32 service status checks.
*/
// Check if the calling function requires a return value
$sGiveOutput = isset($argv[1]) && $argv[1] == 'output' ? true : false;
// Check indexed document count
// If the number of indexed documents is greater than the set amount, restart open office
// this clears open office's memory usage
$resetPoint = 50;
// todo: put in config
$count = Indexer::getIndexedDocumentCount();
$restartOO = false;
if ($count > $resetPoint) {
    $restartOO = true;
    // reset the count
    Indexer::updateIndexedDocumentCount(0);
    $default->log->debug('Check Open Office Task: Restarting open office.');
}
// First we check the host:port to see if open office is running
$sCheckOO = SearchHelper::checkOpenOfficeAvailablity();
if (empty($sCheckOO) && !$restartOO) {
    // If the check returns empty then it is available on that port so we exit
    if ($sGiveOutput) {
        echo 1;
    }
    exit;
開發者ID:jpbauer,項目名稱:knowledgetree,代碼行數:31,代碼來源:checkopenoffice.php

示例2: incrementCount

 private static function incrementCount()
 {
     // Get count from system settings
     $count = Indexer::getIndexedDocumentCount();
     $count = (int) $count + 1;
     Indexer::updateIndexedDocumentCount($count);
 }
開發者ID:5haman,項目名稱:knowledgetree,代碼行數:7,代碼來源:indexerCore.inc.php


注:本文中的Indexer::getIndexedDocumentCount方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。