bitmagnet
bitmagnet copied to clipboard
Field-Specific Search
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
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.
Just wondering if it's not better to use an Elasticsearch or similar, instead implement the whole search in the Postgres. When found a new torrent insert to Postgres with his hash and insert on ElasticSeartch with metadata (tags, quality, etc). What do you think?
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-your-data.html#common-search-options
Just wondering if it's not better to use an Elasticsearch or similar, instead implement the whole search in the Postgres
It's a trade-off. Yes, something like Elasticsearch could offer more performant and feature-rich search, but it's also a massive piece of infra, it would exclude a lot of people from using the software (if it was a hard dependency), and would also be a lot of work to integrate.