How to create a From-To query for manufactureYear

I seem to have the same problem with manufactureYear as with enginePower: I cannot create a query like “manufactureYear >= YYYY and manufactureYear <= YYYY”.
Although manufactureYear is of type “string or number” according to the documentation i get the following error when creating a query like { manufactureYear: { _gt: 2018} }:

{status: 400, code: ‘QUERY_VALIDATION_FAILED’, title: ‘Query validation failed’, detail: ‘Failed to validate query: Value “2018” can not be used for property “manufactureYear” of type “string”’}

I assume I will get another error if I give the year as a string instead of a number (but I haven’t tested that yet).

Should I create another ticket for this issue?

Hello,

yes this is also not possible for now. We are currently discussing the switch to number for enginePower and will also consider it for manufactureYear. As this is a breaking API change we will announce it here in the forum (like we did with previous breaking changes) and give some time to adjust to it. We also need to migrate possible existing usage of both fields as string (e.g. "120kW" for enginePower).


Hans