Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use kiwi-torrent-research search index #1

Open
Kiwi-Torrent-Research opened this issue Jan 25, 2025 · 0 comments
Open

Use kiwi-torrent-research search index #1

Kiwi-Torrent-Research opened this issue Jan 25, 2025 · 0 comments

Comments

@Kiwi-Torrent-Research
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant