Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/common
tomleb ba683c3bcb Improve search and fix '*' in search box (#871)
* Improve ES search

The new performance is very good.
Some examples on my 1.5gb vm:
INFO[0153] Query 'shingeki' took 6 milliseconds.
INFO[0125] Query 'アニメ' took 17 milliseconds.
INFO[0102] Query 'shingeki -kyojin horrible ' took 12 milliseconds

Looking at the criteria we wanted here:
https://pad.riseup.net/p/i8DrilHDWRvf, it meets:

1. Fast: sub-100ms for a typical query, sub-50ms is good and sub-20ms is
optimal
2. Prefix match: "horrible" finds horriblesubs
3. Substring match? "アニメ" finds "TVアニメ"
4. Position-independent terms ("shingeki kyojin" finds the same as
"kyojin shingeki")
5. Works with short term lengths correctly and fast (no in "kyoukai no
kanata", 04 in "horrible shingeki 04" etc)
7. (nice to have) search negation: shingeki kyojin -horriblesubs

* Use match_all query instead of *, fix *
2017-06-01 08:38:29 +10:00
..
comment.go add new db interface beginnings 2017-05-14 19:31:17 -04:00
errors.go add new db interface beginnings 2017-05-14 19:31:17 -04:00
report.go add new db interface beginnings 2017-05-14 19:31:17 -04:00
scrape.go add new db interface beginnings 2017-05-14 19:31:17 -04:00
search.go Renamed the search argument FromID instead of TorrentID 2017-05-30 14:12:42 +02:00
torrent.go Improve search and fix '*' in search box (#871) 2017-06-01 08:38:29 +10:00
user.go Golint friendly next (#756) 2017-05-26 12:12:52 +02:00