diff --git a/lib/Bot/BB3/Roles/RestAPI.pm b/lib/Bot/BB3/Roles/RestAPI.pm index b3c3b77..132788d 100644 --- a/lib/Bot/BB3/Roles/RestAPI.pm +++ b/lib/Bot/BB3/Roles/RestAPI.pm @@ -108,7 +108,7 @@ sub handle_request { host => '*special', #TODO fix this to be an actual hostname! # Make sure it isn't messed up by the alias feature.. server => $data->{server} // '*special', - nolearn => 1, + # nolearn => 1, }; # Avoid passing around the full reference diff --git a/plugins/factoids.pm b/plugins/factoids.pm index b1fe431..7c64384 100644 --- a/plugins/factoids.pm +++ b/plugins/factoids.pm @@ -679,11 +679,11 @@ get_factoid_search (depth, factoid_id, subject, copula, predicate, author, modif WHERE NOT deleted ORDER BY original_subject ASC, depth ASC, factoid_id DESC ) -SELECT ts_rank(full_document_tsvector, websearch_to_tsquery(?)) AS rank, * FROM get_factoid_search ORDER BY 1 DESC LIMIT 10 +SELECT ts_rank(full_document_tsvector, websearch_to_tsquery('factoid', ?)) AS rank, * FROM get_factoid_search WHERE ts_rank(full_document_tsvector, websearch_to_tsquery('factoid', ?)) > 0.01 ORDER BY 1 DESC, factoid_id DESC LIMIT 10 ", { Slice => {} }, $namespace, $server, - $body, + $body, $body ); if ($results and @$results) {