From: Andrew Dolgov Date: Mon, 9 Jul 2012 17:44:37 +0000 (+0400) Subject: split related title to separate define _NGRAM_TITLE_RELATED_THRESHOLD X-Git-Tag: 1.6.0~191 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6f4bd262dbeb31030ab90ac45c55d8b809ca2427;p=tt-rss.git split related title to separate define _NGRAM_TITLE_RELATED_THRESHOLD --- diff --git a/include/functions.php b/include/functions.php index 06939c63..c98de261 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3436,12 +3436,12 @@ // N-grams - if (DB_TYPE == "pgsql" and defined('_NGRAM_TITLE_DUPLICATE_THRESHOLD')) { + if (DB_TYPE == "pgsql" and defined('_NGRAM_TITLE_RELATED_THRESHOLD')) { $ngram_result = db_query($link, "SELECT id,title FROM ttrss_entries,ttrss_user_entries WHERE ref_id = id AND updated >= NOW() - INTERVAL '7 day' - AND similarity(title, '$title_escaped') >= "._NGRAM_TITLE_DUPLICATE_THRESHOLD." + AND similarity(title, '$title_escaped') >= "._NGRAM_TITLE_RELATED_THRESHOLD." AND title != '$title_escaped' AND owner_uid = $owner_uid");