fix text search bug

This commit is contained in:
Daniel
2020-07-02 19:07:41 -04:00
parent 25a7eadf41
commit 6557e477b1
3 changed files with 7 additions and 7 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -99,14 +99,14 @@ export default function search_api(input) {
if (inputtext.length > 0) {
inputtext = cleanInputRegex(inputtext);
let parm = (() => {
let list = [
{ 'gsx$tags': { "$or": inputtext }},
const parm = (() => {
const list = [
{ 'gsx$tags': { '$regex': inputtext }},
{ 'gsx$ability': { '$regex': inputtext }}
]
if (input.flavor) {
list.push({ 'gsx$flavortext': { "$or": inputtext }});
list.push({ 'gsx$artist': { "$or": inputtext }});
list.push({ 'gsx$flavortext': { '$regex': inputtext }});
list.push({ 'gsx$artist': { '$regex': inputtext }});
}
return list;
})();