[ARVADOS] updated: 1.3.0-1093-g071956793

Git user git at public.curoverse.com
Mon Jun 17 20:15:47 UTC 2019


Summary of changes:
 services/api/lib/record_filters.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

       via  0719567935227976b0331c9fd231a184bcabdc1a (commit)
      from  2fc45a003109270ab5601989c4a66c6a498a2f1a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0719567935227976b0331c9fd231a184bcabdc1a
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date:   Mon Jun 17 14:58:17 2019 -0400

    15106: Adds trigram support for "like" queries
    
    Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <ebiagiotti at veritasgenetics.com>

diff --git a/services/api/lib/record_filters.rb b/services/api/lib/record_filters.rb
index 982a9c30b..c8f024291 100644
--- a/services/api/lib/record_filters.rb
+++ b/services/api/lib/record_filters.rb
@@ -44,9 +44,9 @@ module RecordFilters
 
       cond_out = []
 
-      if attrs_in == 'any' && operator.casecmp('ilike') && (operand.is_a? String) && operand.match('^[%].*[%]$')
+      if attrs_in == 'any' && (operator.casecmp('ilike').zero? || operator.casecmp('like').zero?) && (operand.is_a? String) && operand.match('^[%].*[%]$')
         # Trigram index search
-        cond_out << model_class.full_text_trgm + " ilike ?"
+        cond_out << model_class.full_text_trgm + " #{operator} ?"
         param_out << operand
         # Skip the generic per-column operator loop below
         attrs = []

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list