Difegue / DoujinSoft

Web Shop/Archive for WarioWare DIY games.
https://diy.tvc-16.science/
GNU General Public License v3.0
51 stars 6 forks source link

Ability to search via game description text #10

Open ElfEars opened 4 years ago

ElfEars commented 4 years ago

Currently the search system is pretty good however one key missing feature is the ability to search for text found in game descriptions.

I'm thinking that a substring search for the entered text would be the most helpful but obviously this is a bit intensive. I'm not sure whether like %searchterm% or instr is faster for this kind of searching (Although I see you currently use like for search purposes)

(BTW, you can currently use % in regular title/author searches. It's EXTREMELY useful but I'm not sure whether this is an intended feature. Might be worth adding to the FAQ)

Interested on any feedback for this request.

Difegue commented 4 years ago

I don't think description searches would be more intensive than the current name/creator searches if the matching indexes are added on the SQLite side.
(I'm no SQL guru so if there's something more efficient than LIKE I'm all ears)
UI-wise it'd be pretty easy to add a textbox for description searching as well.

If I get a PR for this I don't mind reviewing and adding it, but right now I'm not working on DoujinSoft and would probably prioritize adding a .mio upload/administration system before getting to this.

As for the %s, I wasn't aware of it but it's likely a side effect of Java's PreparedStatements. Shouldn't cause any harm.