search: refactor scan_query callers to use split_query.

Refactor to use split_query instead of scan_query to split a query on
spaces. Preparation for refactoring scan_query into something smarter.
This commit is contained in:
evazion
2020-04-18 19:57:58 -05:00
parent d0c68e68c2
commit 7726563733
7 changed files with 17 additions and 13 deletions

View File

@@ -760,6 +760,10 @@ class PostQueryBuilder
list
end
def split_query(query)
scan_query(query)
end
def normalize_query(query, normalize_aliases: true, sort: true)
tags = scan_query(query.to_s)
tags = tags.map { |t| Tag.normalize_name(t) }