search: support negated wildcards in post searches.

* Support negated wildcards in searches (e.g. "holding -holding_*")
* Raise wildcard limit to matching 25 tags regardless of user level.
* Fix wildcards potentially matching empty tags.
* Fix wildcard tags being sorted by post count only, and therefore not
  having a stable ordering when tags have equal post counts.
* Fix sidebar to calculate wildcards tags the same way the search does.
This commit is contained in:
evazion
2020-03-06 22:40:00 -06:00
parent 967d398c8e
commit 1a2c082b86
4 changed files with 45 additions and 13 deletions

View File

@@ -48,7 +48,7 @@ module PostSetPresenters
end
def pattern_tags
Tag.name_matches(post_set.tag_string).order(post_count: :desc).limit(MAX_TAGS).pluck(:name)
Tag.wildcard_matches(post_set.tag_string)
end
def saved_search_tags