about summary refs log tree commit diff
path: root/app/helpers/search_helper.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-01-10 03:45:29 -0600
committermultiple creatures <dev@multiple-creature.party>2020-01-10 03:45:29 -0600
commitf03960382bd05b8570e0e3b1066545831c59138a (patch)
treee7f4b362018e17e2a475a9c2e6988b0ebd79ac5d /app/helpers/search_helper.rb
parent4c8591fbeae9054a354f955e37a95aeed369222a (diff)
switch (back) to postgres fts engine for fast search & timeline filters
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r--app/helpers/search_helper.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
deleted file mode 100644
index 8bddbe187..000000000
--- a/app/helpers/search_helper.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-require 'sixarm_ruby_unaccent'
-
-module SearchHelper
-	def expand_search_query(query)
-    return '' if query.blank?
-    query = query.downcase.unaccent.gsub(/[^\p{Word} [:punct:]]/, '').gsub(/  +/, ' ').strip
-    return '' if query.blank?
-
-    if query.include?(':')
-      query_parts = query.split(':', 2)
-      if %w(tag tags).include?(query_parts[0])
-        query = "^tag (#{query_parts[1].split.join('|')})"
-      elsif %w(subj text desc).include?(query_parts[0])
-        query = "^#{query_parts[0]} .*#{query_parts[1]}"
-      end
-    end
-
-    query.gsub(/"(.*)"/, '\\y\1\\y')
-  end
-end