How to create a from-to query for enginePower

In my development of a search and filter functionality for vehicles I have the requirement to filter vehicles by entering a minimum and maximum engone power value.

Now the enginePower field in Calponia is defined as string so already that is a problem because e. g the string “20” is greater than the string “100”.

But on top of that I cannot use comparisons like “_gte” in a query with string values, that is not supported according to the error message I get.

What can I do?

Looks like a bug to me (invalid data-type). Suggest to create a ticket.

In the meantime a dirty workaround could be to chain_eq conditions in an _or statement.

Ticket created.

The workaround sounds too dirty to really use :wink:

1 Like