Ask A Question

Notifications

You’re not receiving notifications from this thread.

Searchkick/ElasticSearch not accepting Rails/Ruby booleans?

Cory Johnson asked in General

Hey everyone! I'm trying to get elastic search to work with a checkbox, but as they return a 0 or 1 as booleans, elastic search doesn't accept these params. Does anyone know how to get elastic search to work with a 0 or 1? At the moment, I've found a solution by converting the data-types of my 'paid' column to strings which are validated to require 'true' or 'false', but that's obviously not ideal.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.