lichess-org / lila-openingexplorer

Opening explorer for lichess.org that can handle all the variants and trillions of unique positions
http://lichess.org/analysis#explorer
GNU Affero General Public License v3.0
135 stars 34 forks source link

API documentation specifies 8 recent and top games, but seems to only deliver 4 #160

Closed maxim-devereaux closed 2 years ago

maxim-devereaux commented 2 years ago

E.g. as used for Lichess: https://explorer.lichess.ovh/lichess?variant=standard&speeds=blitz,rapid,classical&ratings=2200,2500&fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR%20w%20KQkq%20-%200%201&topGames=8&recentGames=0

Specifying <=4 for topGames or recentGames works as expected, but values >4 only give 4 results.

Perhaps caused by the limits / truncation imposed in: https://github.com/lichess-org/lila-openingexplorer/blob/master/src/model/lichess.rs (lines 18, 19, 424)?

niklasf commented 2 years ago

Thanks. The documentation wasn't accurate.

(With the way the games are stored, the truncation is required for correctness. So the only way to get more games would be to raise the limit in the constant and reindex, which would make the database larger. That's why the much smaller masters database and individual player databases have higher limits.)