I've got a Category object with SearchableComponent Price which stores BigDecimal. I've specified the format of Bigdecimal to "#0000.00".
When I use queryString like this:
session.queryBuilder().queryString("amount:[10 TO 15]")
I receive +amount:[0010,00 TO 0015,00] and everything is ok, but
when I use:
session.queryBuilder().between("amount", new BigDecimal(10), new BigDecimal(60), true)
I receve: +amount:[10 TO 60] and no hits are returned.
If I specify:
session.queryBuilder().between("amount", "0010,00", "0060,00", true) it's ok.
I'm a bit misguided by the API because it specifies the Object as a parameter, but providing one does not have a correct effect.
Should I take care of formatting the object to correct string? If so shouldn't this method receive String parameters instead of Object?
The other solution is might be to provide additional boolean parameter which would trigger parsing of query as it is done in queryStirng method.