lib/inquisitio/searcher.rb in inquisitio-1.1.2 vs lib/inquisitio/searcher.rb in inquisitio-1.2.0
- old
+ new
@@ -141,10 +141,14 @@
end
end
def search_url
@search_url ||= begin
- return_fields = params[:returns].empty? ? [:type, :id] : params[:returns]
+ if Inquisitio.config.api_version == '2011-02-01'
+ return_fields = params[:returns].empty? ? [:type, :id] : params[:returns]
+ elsif Inquisitio.config.api_version == '2013-01-01'
+ return_fields = params[:returns].empty? ? nil : params[:returns]
+ end
SearchUrlBuilder.build(
query: params[:criteria],
filters: params[:filters],
arguments: params[:with].merge({