From 251c8d5b1797cff7600f7e664e095acf3f728677 Mon Sep 17 00:00:00 2001 From: Rushiraj Nenuji <19696935+rushirajnenuji@users.noreply.github.com> Date: Wed, 27 Oct 2021 14:35:25 -0700 Subject: [PATCH] Updating the identifier search query to utilized the collation index and drop the `BINARY` keyword Updating the identifier search query to utilized the collation index and drop the `BINARY` keyword - improves search speed Reference: #159 #160 --- impl/search_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impl/search_util.py b/impl/search_util.py index 413c799ac..132d47eac 100644 --- a/impl/search_util.py +++ b/impl/search_util.py @@ -288,7 +288,7 @@ def formulateQuery( v = "doi:" + v if v == None: v = value - filters.append(django.db.models.Q(identifier__startswith=v)) + filters.append(django.db.models.Q(identifier__istartswith=v)) elif column == "identifierType": if isinstance(value, basestring): value = [value]