babenkoivan / elastic-scout-driver-plus

Extension for Elastic Scout Driver
MIT License
267 stars 52 forks source link

Setting a bool via value() transforms the type #107

Closed ghost closed 2 years ago

ghost commented 2 years ago

Not sure if this is a design decision, but it does not seem logical when doing:

Query::term()->field('boolean_field')->value(true);

That it results in an error: failed to create query: Can't parse boolean value [1], expected [true] or [false]

Doing (notice the string value 'true'):

Query::term()->field('boolean_field')->value('true');

Successfully executes.

This behaviour has changes since Elastic Search 6.x and only allows real boolean values, as the error indicates.

babenkoivan commented 2 years ago

Hey @renzo-s, thank you for submitting a bug!

It should be fixed now in v3.2.1 🎉