mirror of
https://github.com/perlbot/perlbuut
synced 2025-06-07 18:45:42 -04:00
update factoid search
This commit is contained in:
parent
5d8ed2ae4a
commit
8b0b267585
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue