From 359552be6e2ac6f8a1ba2f376d183b1b69b46427 Mon Sep 17 00:00:00 2001 From: Ben Thompson Date: Thu, 22 May 2014 15:07:19 -0400 Subject: [PATCH] Replace any spaces with regex '.*' so multi-word search works on similar strings. --- node-datasource/lib/query/freetext_query.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node-datasource/lib/query/freetext_query.js b/node-datasource/lib/query/freetext_query.js index da8bff7a0..29a88f248 100644 --- a/node-datasource/lib/query/freetext_query.js +++ b/node-datasource/lib/query/freetext_query.js @@ -45,7 +45,8 @@ noarg:true, regexp:true, undef:true, strict:true, trailing:true, white:true */ parameters : [{ attribute: _.pluck(columns, 'name'), operator: 'MATCHES', - value: that.query.q + /* Replace any spaces with regex '.*' so multi-word search works on similar strings. */ + value: that.query.q.replace(' ', '.*') }] }, _.omit(this.query, 'q')); -- 2.39.2