public function getIndexedDocuments()
    {
        $db = $this->getSearchDbHandle();
        $sql = '
			SELECT count(DISTINCT documentPath) AS indexedDocuments
			  FROM term_frequency
		';
        if (!$stmt = $db->query($sql)) {
            $errorInfo = $db->errorInfo();
            $errorMsg = $errorInfo[2];
            throw new \RuntimeException('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>');
        }
        $result = $stmt->fetch(\PDO::FETCH_COLUMN);
        if (false === $result) {
            $errorInfo = $db->errorInfo();
            $errorMsg = $errorInfo[2];
            throw new \RuntimeException('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>');
        }
        return (int)$result;
    }
public function getIndexedDocuments()
    {
        $db = $this->getSearchDbHandle();
        $sql = '
			SELECT count(DISTINCT documentPath) AS indexedDocuments
			  FROM term_frequency
		';
        if (!$stmt = $db->query($sql)) {
            $errorInfo = $db->errorInfo();
            $errorMsg = $errorInfo[2];
            throw new \RuntimeException('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>');
        }
        $result = $stmt->fetch(\PDO::FETCH_COLUMN);
        if (false === $result) {
            $errorInfo = $db->errorInfo();
            $errorMsg = $errorInfo[2];
            throw new \RuntimeException('SQLite Exception: ' . $errorMsg . ' in SQL: <br /><pre>' . $sql . '</pre>');
        }
        return (int)$result;
    }
public function getIndexedDocuments ( ) { $ db = $ this -> getSearchDbHandle ( ) ; $ sql = '
			SELECT count(DISTINCT documentPath) AS indexedDocuments
			  FROM term_frequency
		' ; if ( ! $ stmt = $ db -> query ( $ sql ) ) { $ errorInfo = $ db -> errorInfo ( ) ; $ errorMsg = $ errorInfo [ 2 ] ; throw new \ RuntimeException ( 'SQLite Exception: ' . $ errorMsg . ' in SQL: <br /><pre>' . $ sql . '</pre>' ) ; } $ result = $ stmt -> fetch ( \ PDO :: FETCH_COLUMN ) ; if ( false === $ result ) { $ errorInfo = $ db -> errorInfo ( ) ; $ errorMsg = $ errorInfo [ 2 ] ; throw new \ RuntimeException ( 'SQLite Exception: ' . $ errorMsg . ' in SQL: <br /><pre>' . $ sql . '</pre>' ) ; } return ( int ) $ result ; }
Returns the amount of distinct documents
that are currently in the search index.
@return int
@throws \Exception
Returns the amount of distinct documents that are currently in the search index .