Ruby - Not able to apply range filter


#1

Referred range filter and combine filter section at https://swiftype.com/documentation/app-search/api/search/filters

def talent_search
  client = SwiftypeAppSearch::Client.new(host_identifier: ENV["SWIFTYPE_HOST_IDENDIFIER"], api_key: ENV["SWIFTYPE_SEARCH_KEY"])
  engine_name = ENV["SWIFTYPE_ENGINE_NAME"]
    query = ""
  options = {
    filters: {
      all: [
        {"profile_active": "true"},
        {"desired_compensation": { from: 4000, to: 8000 } }
      ]
    },
    result_fields: { id: {raw: {}}, email: {raw: {}} }
  }

  begin
    response = client.search(engine_name, query, options)
    p response["results"], '----- SWIFTYPE RESPONSE -----'
  rescue SwiftypeAppSearch::ClientException => e
    puts e
    p '==================='
  end    
end  

Getting
Error: Filters contains invalid value for field: desired_compensation; must be a string, or an array of strings

Please let me know what I am missing here.


#2

Responded here: https://github.com/swiftype/swiftype-app-search-ruby/issues/39