bitmagnet-io / bitmagnet

A self-hosted BitTorrent indexer, DHT crawler, content classifier and torrent search engine with web UI, GraphQL API and Servarr stack integration.
https://bitmagnet.io/
MIT License
1.96k stars 74 forks source link

Field-Specific Search #223

Open 8ullyMaguire opened 2 months ago

8ullyMaguire commented 2 months ago

Implement the ability to search within specific fields like title, description, tags, source, resolution, etc. This would enable users to narrow down their searches to specific metadata fields, resulting in more relevant and accurate results.

Related

mgdigital commented 2 months ago

Tags and resolution are filterable. This is separate from the search query string. I don't know that it needs additional support within the query string (or that it doesn't).

I'm not opposed to field specific search, but there are a few trade-offs here, a) a more complex implementation vs the current search which uses a single weighted tsvector and simple-to-implement query string rank, b) larger index sizes that would be required and c) (probably) reduced performance, d) likely more complex search string syntax needed to support this: field-specific queries may be best done using the filters element of the API, where the filter value is an enumeration (e.g. resolution and tag).

I'll leave this open for now, it's worth further consideration but will probably be prioritised after some other "missing" features are implemented as the current search is fairly complete relative to other features.