[Enhancement] Added search to source forms (#259)

* Changed sqlite FTS to use a trigram tokenizer

* Added search UI to source tables

* Fix bug with special chars in search form

* improved main search results form

* Improved centering for media table header elements
This commit is contained in:
Kieran
2024-05-23 15:09:49 -07:00
committed by GitHub
parent 8b0b41186a
commit 95a0c29358
7 changed files with 177 additions and 28 deletions
+11
View File
@@ -727,6 +727,17 @@ defmodule Pinchflat.MediaTest do
test "returns an empty list when the search term is nil" do
assert [] = Media.search(nil)
end
test "doesn't blow up if there's an apostrophe or quotes in the search term" do
assert [] = Media.search("don't expl'ode")
assert [] = Media.search(~s(dont expl"o"de))
assert [] = Media.search(~s(dont explo"de))
end
test "doesn't blow up if there is a trailing operand" do
assert [] = Media.search("foo OR")
assert [] = Media.search("foo AND")
end
end
describe "get_media_item!/1" do