/artists: drop deprecated search syntax, add regex search for names.

Drop support for the following pseudo-metatags in the Name field in the
artists search form:

* name:<name>
* other:<other name>
* group:<group name>
* status:banned
* status:active
* http://www.example.com

Instead, make the Name field do a wildcard search against the artist
name, group name, or other names. If the query looks like `/regex/`,
then do a regex search against any of these names.

/artists?search[name] now does a literal exact match and
/artists?search{any_name_matches] does the above wildcard/regex search.
This commit is contained in:
evazion
2018-09-21 18:34:39 -05:00
parent 237ab9b782
commit f917b83d6f
4 changed files with 10 additions and 39 deletions

View File

@@ -182,7 +182,7 @@ Autocomplete.initialize_artist_autocomplete = function($fields) {
$.ajax({
url: "/artists.json",
data: {
"search[name]": req.term + "*",
"search[name_like]": req.term.trim().replace(/\s+/g, "_") + "*",
"search[is_active]": true,
"search[order]": "post_count",
"limit": 10,