search: drop special case for pixiv urls in source: metatag.

* Drop support for `source:pixiv/artist-name` searches. This was a hack
  that only worked on old pixiv urls that haven't been used for years.
* Replace the old SourcePattern(lower(source)) index with a trigram index.
This commit is contained in:
evazion
2019-08-29 01:46:37 -05:00
parent 65e53b86b3
commit 8756480500
5 changed files with 34 additions and 37 deletions

View File

@@ -2206,8 +2206,6 @@ class PostTest < ActiveSupport::TestCase
assert_tag_match([], "source:*.pixiv.net/img*/artist-fake/*")
assert_tag_match([post], "source:http://*.pixiv.net/img*/img/artist-name/*")
assert_tag_match([], "source:http://*.pixiv.net/img*/img/artist-fake/*")
assert_tag_match([post], "source:pixiv/artist-name/*")
assert_tag_match([], "source:pixiv/artist-fake/*")
end
should "return posts for a pixiv id search (type 1)" do