Skip to content

Commit bc7096f

Browse files
committed
ignore case search
1 parent b4c871d commit bc7096f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

web/server.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ def search_resource(self):
9898
projection = {'_id': False,
9999
'data.info': True,
100100
}
101+
print(111,param)
101102
data = self.mongo.db["yyets"].find({
102103
"$or": [
103-
{"data.info.cnname": {'$regex': f'.*{param}.*'}},
104-
{"data.info.enname": {'$regex': f'.*{param}.*'}},
105-
{"data.info.aliasname": {'$regex': f'.*{param}.*'}},
104+
{"data.info.cnname": {'$regex': f'.*{param}.*', "$options": "-i"}},
105+
{"data.info.enname": {'$regex': f'.*{param}.*', "$options": "-i"}},
106+
{"data.info.aliasname": {'$regex': f'.*{param}.*', "$options": "-i"}},
106107
]},
107108
projection
108109
)

0 commit comments

Comments
 (0)