shimupan / lineupx

A Free Lineup Database for a Variety of Games
https://lineupx.net
MIT License
20 stars 0 forks source link

336 better filtering and sorting of posts #373

Open shashwot2 opened 1 month ago

shashwot2 commented 1 month ago

Added mongodb text indexing for better searching performance.

shashwot2 commented 1 month ago

Wait before merging, There's like an artifact sometimes where the text score is not being present from the filter(Atleast locally).

shashwot2 commented 1 month ago

Nevermind, I can't seem to recreate it now lol. Maybe someone should try my branch before merge.

Kagiri2 commented 1 month ago

the filtering and sorting should work with the search bar and the filter posts component once you searched something. should work pretty much the same as how it works on the live server

Currently the searchbar works but it stops working after 1 search and I have to restart the api server. Also I don't think the filter does anything rn cause I used the Today filter and a 8 month ago post still shows.

Error log for when you searched something, crashes api server `node:events:491 throw er; // Unhandled 'error' event ^

Error: listen EADDRINUSE: address already in use :::1337 at Server.setupListenHandle [as _listen2] (node:net:1485:16) at listenInCluster (node:net:1533:12) at Server.listen (node:net:1621:7) at Function.listen (C:\Users\derek\OneDrive\Documents\GitHub\lineupxreal\src\api\node_modules\express\lib\application.js:635:24) at file:///C:/Users/derek/OneDrive/Documents/GitHub/lineupxreal/src/api/server.js:51:5 at ModuleJob.run (node:internal/modules/esm/module_job:193:25) at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:527:24)
at async loadESM (node:internal/process/esm_loader:91:5) at async handleMainPromise (node:internal/modules/run_main:65:12) Emitted 'error' event on Server instance at: at emitErrorNT (node:net:1512:8)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { code: 'EADDRINUSE', errno: -4091, syscall: 'listen', address: '::', port: 1337 }

Node.js v18.9.0 [nodemon] app crash`

shashwot2 commented 1 month ago

I'll fix it. The filtering was broken last time I checked as well

shashwot2 commented 2 weeks ago

Going to make searching nothing pop up everything

shimupan commented 1 week ago

is this pr finished?

shashwot2 commented 1 week ago

almost. still need to get the filters working they don't work currently

shashwot2 commented 1 week ago

@shimupan should be done now i think. Fixing the frontend filtering on top of filtering maybe on next issue. Getting too large for one i feel.