lib/inquisitio/searcher.rb in inquisitio-1.4.0 vs lib/inquisitio/searcher.rb in inquisitio-1.4.1
- old
+ new
@@ -16,11 +16,12 @@
per: 10,
page: 1,
returns: [],
with: {},
sort: {},
- q_options: {}
+ q_options: {},
+ expressions: {}
}
@failed_attempts = 0
yield(self) if block_given?
end
@@ -88,10 +89,16 @@
clone do |s|
s.params[:q_options] = value
end
end
+ def expressions(value)
+ clone do |s|
+ s.params[:expressions] = value
+ end
+ end
+
def per(value)
clone do |s|
s.params[:per] = value.to_i
end
end
@@ -172,9 +179,10 @@
arguments: params[:with],
size: params[:per],
start: params[:per] * (params[:page] - 1),
sort: params[:sort],
q_options: params[:q_options],
+ expressions: params[:expressions],
return_fields: return_fields
)
end
end