From: <var...@us...> - 2015-03-05 18:07:09
|
Revision: 9608 http://sourceforge.net/p/phpwiki/code/9608 Author: vargenau Date: 2015-03-05 18:06:57 +0000 (Thu, 05 Mar 2015) Log Message: ----------- Update comments Modified Paths: -------------- trunk/lib/WikiDB/backend/PearDB_ffpgsql.php trunk/lib/WikiDB/backend/PearDB_pgsql.php Modified: trunk/lib/WikiDB/backend/PearDB_ffpgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2015-03-05 17:23:44 UTC (rev 9607) +++ trunk/lib/WikiDB/backend/PearDB_ffpgsql.php 2015-03-05 18:06:57 UTC (rev 9608) @@ -551,6 +551,9 @@ return new WikiDB_backend_PearDB_generic_iter($this, $result); } + /* + * Rename page in the database. + */ function rename_page($pagename, $to) { $dbh = &$this->_dbh; @@ -590,6 +593,9 @@ parent::increaseHitCount($page_prefix . $pagename); } + /* + * Serialize data + */ function _serialize($data) { return WikiDB_backend_PearDB::_serialize($data); @@ -714,16 +720,15 @@ * TODO: don't parse the words into nodes. rather replace "[ +]" with & and "-" with "!" and " or " with "|" * tsearch2 query language: @@ "word | word", "word & word", ! word * ~* '.*something that does not exist.*' + * + * phrase search for "history lesson": + * + * SELECT id FROM tab WHERE ts_idx_col @@ to_tsquery('history&lesson') + * AND text_col ~* '.*history\\s+lesson.*'; + * + * The full-text index will still be used, and the regex will be used to + * prune the results afterwards. */ - /* - phrase search for "history lesson": - - SELECT id FROM tab WHERE ts_idx_col @@ to_tsquery('history&lesson') - AND text_col ~* '.*history\\s+lesson.*'; - - The full-text index will still be used, and the regex will be used to - prune the results afterwards. - */ function _fulltext_match_clause($node) { $word = strtolower($node->word); Modified: trunk/lib/WikiDB/backend/PearDB_pgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_pgsql.php 2015-03-05 17:23:44 UTC (rev 9607) +++ trunk/lib/WikiDB/backend/PearDB_pgsql.php 2015-03-05 18:06:57 UTC (rev 9608) @@ -264,23 +264,6 @@ } /* - most used words: -select * from stat('select idxfti from version') order by ndoc desc, nentry desc, word limit 10; - word | ndoc | nentry ------------------+------+-------- - plugin | 112 | 418 - page | 85 | 446 - phpwikidocument | 62 | 62 - use | 48 | 169 - help | 46 | 96 - wiki | 44 | 102 - name | 43 | 131 - phpwiki | 42 | 173 - see | 42 | 69 - default | 39 | 124 - */ - - /* * use tsearch2. See schemas/psql-tsearch2.sql and /usr/share/postgresql/contrib/tsearch2.sql * TODO: don't parse the words into nodes. rather replace "[ +]" with & and "-" with "!" and " or " with "|" * tsearch2 query language: @@ "word | word", "word & word", ! word This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |