optimisation index partiels sur what

This commit is contained in:
cquest 2016-11-20 11:33:45 +01:00
parent ee082a91de
commit 604a079368

View file

@ -232,7 +232,7 @@ class EventResource(BaseEvent):
if 'what' in req.params:
# limit search based on "what"
event_what = cur.mogrify(" AND events_what LIKE %s ", (req.params['what']+"%",)).decode("utf-8")
event_what = cur.mogrify(" AND events_what LIKE %s AND events_what LIKE %s ", (req.params['what'][:4]+"%",req.params['what']+"%")).decode("utf-8")
else:
event_what = ""