Closed yaroto98 closed 6 years ago
Yes, right now we're matching on the entire string.
results =
from t in Torrent,
where: ilike(t.name, ^"%#{params["term"]}%"),
order_by: [desc: :inserted_at]
I'll tweak it. I think I'll have to split the term on space, and add multiple where statements. We'll see.
Yea, that's probably the quickest and easiest way to do it. Alternatively we could set up Full Text Search for that field. It'd be more setup, but probably a lot easier to maintain in the long run.
Have you guys taken a look at fuzzystrmatch
and pg_trgm
?
Can we change the "inserted_at" variable to something else? What other sorting options are available? I'm trying to show most seeded torrents at top. https://github.com/sergiotapia/magnetissimo/issues/36
If you replace "inserted_at" with "seeders" you will show most seeded torrents at top.
file: web/controllers/page_controller.ex
I'll add sortable table headers tonight so you'll be able to sort within the app itself, ez-pz. 😄
Closed in favour of this future feature. It's in the pipeline :)
When searching for a tv episode using the typical nomenclature (example: "Magicians s02e01") doesn't catch all the results it should. I believe this is because the search is looking for the exact string entered, not performing a proper search of multiple strings. The example "Magicians s02e01" won't hit on "Magicians US s02e01" because of the "US".
Example of searching just "Magicians" so you can see all the available s02e01 torrents.
Results of searching "Magicians s02e01"