@@ -31,8 +31,9 @@ def fetch_raw_info
3131 end
3232
3333 def update ( body )
34- index_hash = http_put indexes_path ( id : @uid ) , body
34+ index_hash = http_put indexes_path ( id : @uid ) , Utils . transform_attributes ( body )
3535 set_base_properties index_hash
36+
3637 self
3738 end
3839
@@ -65,7 +66,7 @@ def document(document_id)
6566 alias get_one_document document
6667
6768 def documents ( options = { } )
68- http_get "/indexes/#{ @uid } /documents" , options
69+ http_get "/indexes/#{ @uid } /documents" , Utils . transform_attributes ( options )
6970 end
7071 alias get_documents documents
7172
@@ -168,8 +169,9 @@ def delete_all_documents!
168169 ### SEARCH
169170
170171 def search ( query , options = { } )
171- parsed_options = options . compact
172- http_post "/indexes/#{ @uid } /search" , { q : query . to_s } . merge ( parsed_options )
172+ parsed_options = Utils . transform_attributes ( { q : query . to_s } . merge ( options . compact ) )
173+
174+ http_post "/indexes/#{ @uid } /search" , parsed_options
173175 end
174176
175177 ### UPDATES
@@ -229,7 +231,7 @@ def settings
229231 alias get_settings settings
230232
231233 def update_settings ( settings )
232- http_post "/indexes/#{ @uid } /settings" , settings
234+ http_post "/indexes/#{ @uid } /settings" , Utils . transform_attributes ( settings )
233235 end
234236 alias settings = update_settings
235237
0 commit comments