lib/data_tables.rb in data_tables-0.1.17 vs lib/data_tables.rb in data_tables-0.1.18
- old
+ new
@@ -91,11 +91,11 @@
else
must { all }
end
except.each do |expt|
- must_not { term expt[0].to_sym, expt[1].to_s }
+ must_not { match expt[0].to_sym, expt[1].to_s }
end
end
end
# retry #1 exclude sorting from search query
@@ -117,11 +117,11 @@
total_records = Tire.search(elastic_index_name, search_type: 'count') do
query do
boolean do
must { all }
except.each do |expt|
- must_not { term expt[0].to_sym, expt[1].to_s }
+ must_not { match expt[0].to_sym, expt[1].to_s }
end
end
end
filter(:term, domain: domain) unless domain.blank?
es_block.call(self) if es_block.respond_to?(:call)
@@ -216,11 +216,11 @@
must { match :_all, condstr, type: 'phrase_prefix' }
else
must { all }
end
except.each do |expt|
- must_not { term expt[0].to_sym, expt[1].to_s }
+ must_not { match expt[0].to_sym, expt[1].to_s }
end
end
end
filter(:term, domain: domain_name) unless domain_name.blank?
es_block.call(self) if es_block.respond_to?(:call)
@@ -320,10 +320,9 @@
objects = modelCls.paginate(:page => current_page,
:order => order,
:conditions => conditions.join(" AND "),
:per_page => params[:iDisplayLength])
end
- #logger.info("------conditions is #{conditions}")
data = objects.collect do |instance|
columns.collect { |column| datatables_instance_get_value(instance, column) }
end
render :text => {:iTotalRecords => total_records,
:iTotalDisplayRecords => total_display_records,