integrate parser; use parser instead of regex query
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
require 'active_support'
|
||||
require 'squeel'
|
||||
require_relative './text_to_tsquery'
|
||||
require_relative './text_to_regex_query'
|
||||
require_relative './text_to_sql_query'
|
||||
|
||||
module PgSearchable
|
||||
extend ActiveSupport::Concern
|
||||
@@ -48,7 +48,7 @@ module PgSearchable
|
||||
|
||||
def ts_search(value)
|
||||
return if @ts_search_fields.blank? || value.blank?
|
||||
TextToRegexQuery.new(value, @ts_search_fields, @default_field, @ts_search_fields_mappings).where_clause( includes(@ts_joins).references(:all))
|
||||
TextToSqlQuery.new(value, @ts_search_fields, @default_field, @ts_search_fields_mappings).where_clause( includes(@ts_joins).references(:all))
|
||||
end
|
||||
|
||||
def should_update_cache_field?
|
||||
|
||||
Reference in New Issue
Block a user