Skip to content

Use kiwi-torrent-research search index #1

@Kiwi-Torrent-Research

Description

@Kiwi-Torrent-Research

You could use the KTR database search table for a much faster query.

With regards to this line

$db_query = "SELECT infohash,name,size,uploaded,num_files FROM torrents WHERE LOWER(name) LIKE LOWER('%$query%')";

the db_query would become

"SELECT infohash,name,size,uploaded,num_files FROM torrents WHERE rowid IN (SELECT rowid FROM search WHERE name MATCH '%$query%')"

I hope this helps. It should improve query time by several orders of magnitude.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions