AnsweredAssumed Answered

quicksearch $equals instead of $starts

Question asked by Ryan Horton on Apr 18, 2019
Latest reply on Apr 18, 2019 by hats

We have a module where we have the quicksearch searching on two fields. One is a varchar the other is an integer. Is there a way to force the integer field to use $equals instead of $starts? The $starts generates a sql query using 'LIKE' instead of '=' which converts all the integers to strings and adds a lot of unnecessary overhead to the query. If I run the query with = it runs in .00026 seconds where as LIKE takes 6.1 seconds.

 

'quicksearch_field' => array(
   0 => 'name',
   1 => 'customer_number',
),
'quicksearch_priority' => 1,

Can anything be added to the above code to force $equals in customer_number?

Outcomes