[ARVADOS] created: 1.1.0-2-gfc63eab
Git user
git at public.curoverse.com
Tue Oct 31 15:34:13 EDT 2017
at fc63eab411143863c2f7fcf47b54516415b30ff5 (commit)
commit fc63eab411143863c2f7fcf47b54516415b30ff5
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Tue Oct 31 15:31:33 2017 -0400
12462: Treat "/" and "-" as word chars, too.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/apps/workbench/app/assets/javascripts/to_tsquery.js b/apps/workbench/app/assets/javascripts/to_tsquery.js
index 34ccb6c..f2e34d9 100644
--- a/apps/workbench/app/assets/javascripts/to_tsquery.js
+++ b/apps/workbench/app/assets/javascripts/to_tsquery.js
@@ -10,15 +10,16 @@
// Examples:
//
// "foo" => "foo:*"
-// "foo/bar" => "foo:*&bar:*"
+// "foo_bar" => "foo:*&bar:*"
// "foo.bar" => "foo.bar:*" // "." is a word char in FT queries
+// "foo/b-r" => "foo/b-r:*" // "/" and "-", too
// "foo|bar" => "foo:*&bar:*"
// " oo|ba " => "oo:*&ba:*"
-// "// " => null
+// "__ " => null
// "" => null
// null => null
window.to_tsquery = function(q) {
- q = (q || '').replace(/[^\w\.]+/g, ' ').trim().replace(/ /g, ':*&')
+ q = (q || '').replace(/[^-\w\.\/]+/g, ' ').trim().replace(/ /g, ':*&')
if (q == '')
return null
return q + ':*'
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list