Swiftype - Multi search - search query length more than 64 characters


#1

We are integrating Swiftype app search in our Ruby on Rails application. https://github.com/swiftype/swiftype-app-search-ruby - Using this gem. Sample query structure is

[{:query=>""Accounting Manager" OR "Audit/Compilance" OR "Bookkeeper" OR "Controller" OR "Director of Finance" OR "Finance Manager" OR "Finance Analyst" OR "Financial Reporting / SEC" OR "Principal Analyst" OR "Payroll" OR "Revenue" OR "Senior Accountant" OR "Senior Financial Analyst" OR "Staff accountant" OR "Tax"", :options=>{:page=>{:size=>1000}, :search_fields=>{:roles_intersted_in=>{}}, :result_fields=>{:id=>{:raw=>{}}, :email=>{:raw=>{}}}}}, {:query=>"", :options=>{:search_fields=>{:company_size=>{}}, :result_fields=>{:id=>{:raw=>{}}, :email=>{:raw=>{}}}}}, {:query=>"", :options=>{:search_fields=>{:software_experience=>{}}, :result_fields=>{:id=>{:raw=>{}}, :email=>{:raw=>{}}}}}, {:query=>"", :options=>{:search_fields=>{:certifications=>{}}, :result_fields=>{:id=>{:raw=>{}}, :email=>{:raw=>{}}}}}, {:query=>"", :options=>{:search_fields=>{:company_size_interested_in=>{}}, :result_fields=>{:id=>{:raw=>{}}, :email=>{:raw=>{}}}}}, {:query=>"", :options=>{:search_fields=>{:desired_location=>{}}, :result_fields=>{:id=>{:raw=>{}}, :email=>{:raw=>{}}}}}, {:query=>"", :options=>{:search_fields=>{:full_time_role=>{}}, :result_fields=>{:id=>{:raw=>{}}, :email=>{:raw=>{}}}}}, {:query=>"", :options=>{:page=>{:size=>1000}, :search_fields=>{:type_of_employment=>{}}, :result_fields=>{:id=>{:raw=>{}}, :email=>{:raw=>{}}}}}, {:query=>"", :options=>{:page=>{:size=>1000}, :search_fields=>{:years_experience=>{}}, :result_fields=>{:id=>{:raw=>{}}, :email=>{:raw=>{}}}}}, {:query=>"", :options=>{:page=>{:size=>1000}, :search_fields=>{:industry_experience=>{}}, :result_fields=>{:id=>{:raw=>{}}, :email=>{:raw=>{}}}}}]

While query string exceeds 64 character getting error. Is it happening due to using trial version? or paid version also have this restriction? Please clarify us before get paid engines.


#2

Hey @vinothinibj_3. I believe there is a character limit on the “query” parameter for all accounts, whether it is a paid or trial account makes no difference.


#3

@vinothinibj_3 Is it possible for you to use filters instead of a search query?

query = ""
engine_name = "your_engine"
options = {
  filters: {
    roles_intersted_in: ["Accounting Manager", "Audit/Compilance", "Bookkeeper"]
  }
}
client.search(engine_name, query, options)

#4

Thanks @joson.stoltzfus will try this solution and come back to you.