[ARVADOS] updated: cda964acdb8132d90b881e62db008c574fdd5cc4
git at public.curoverse.com
git at public.curoverse.com
Sun Feb 8 16:23:37 EST 2015
Summary of changes:
services/api/lib/record_filters.rb | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
via cda964acdb8132d90b881e62db008c574fdd5cc4 (commit)
from 2e5ac62b550f7dd608cf133ae66ef04f801be76b (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 cda964acdb8132d90b881e62db008c574fdd5cc4
Author: Radhika Chippada <radhika at curoverse.com>
Date: Sun Feb 8 16:22:07 2015 -0500
4523: update full text search to append ':*' for each word to support a collection file search such as dir_name_part space file_name_part.
diff --git a/services/api/lib/record_filters.rb b/services/api/lib/record_filters.rb
index 51153fe..0b65108 100644
--- a/services/api/lib/record_filters.rb
+++ b/services/api/lib/record_filters.rb
@@ -43,11 +43,9 @@ module RecordFilters
end
attrs = [] # skip the generic per-column operator loop below
# Use to_tsquery since plainto_tsquery does not support prefix search.
- # Instead split operand and join the words with ' & ' and add ':*' to the last word
- # Thus when searched for "some str", objects containing "some" and "str:*" are found.
+ # Instead split operand, add ':*' to each word and join the words with ' & '
cond_out << model_class.full_text_tsvector+" @@ to_tsquery(?)"
- operand << ':*'
- param_out << operand.split.join(' & ')
+ param_out << operand.split.each {|s| s.concat(':*')}.join(' & ')
else
attrs.each do |attr|
if !model_class.searchable_columns(operator).index attr.to_s
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list