N°1553 - Search: Fix operator on indexed attributes. It was previously always forced to '=', now it's only defaulted to '='

SVN:trunk[5950]
This commit is contained in:
Eric Espié
2018-07-18 13:13:02 +00:00
parent 27144f07b1
commit df20f1b5ab

View File

@@ -152,7 +152,7 @@ $(function()
_initChooseDefaultOperator: function()
{
//if the class has an index, in order to maximize the performance, we force the default operator to "equal"
if (this.options.field.has_index && typeof this.options.available_operators['='] == 'object')
if (this.options.field.has_index && typeof this.options.available_operators['='] == 'object' && this.options.values.length == 0)
{
this.options.operator = '=';
this.options.available_operators['='].rank = -1;//we want it to be the first displayed