diff options
author | Andrew Dolgov <[email protected]> | 2015-08-04 12:52:49 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-08-04 12:52:49 +0300 |
commit | e854442e1f402349419be2205ddc47173ab9a3df (patch) | |
tree | 7b71f01fc0939b5b01d7eefd4eec6a0601b198fb /include/rssfuncs.php | |
parent | b4f544d3898b1f9e43559a8d25e72a36d2f6390b (diff) |
more fts stuff for simple index
Diffstat (limited to 'include/rssfuncs.php')
-rw-r--r-- | include/rssfuncs.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 6eb4e6d98..5ebddf9ef 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -984,11 +984,22 @@ _debug("RID: $entry_ref_id, IID: $entry_int_id", $debug_enabled); + if (DB_TYPE == "pgsql") { + $tsvector_combined = db_escape_string(mb_substr($entry_title . ' ' . strip_tags($entry_content), + 0, 1000000)); + + $tsvector_qpart = "tsvector_combined = to_tsvector('simple', '$tsvector_combined'),"; + + } else { + $tsvector_qpart = ""; + } + db_query("UPDATE ttrss_entries SET title = '$entry_title', content = '$entry_content', content_hash = '$entry_current_hash', updated = '$entry_timestamp_fmt', + $tsvector_qpart num_comments = '$num_comments', plugin_data = '$entry_plugin_data', author = '$entry_author', |