There seems to be a near-universal condemnation in best practices
guides of using floating point types to store prices, and yet this is
exactly what Solr's example schema.xml does.

This leads to a couple of questions:

0. Is my above assessment just wrong?

1. Is there something unique about Solr that makes using floating
point types for prices a better idea than it would be in, say, a SQL
database?

2. If storing prices isn't a great idea in Solr, should the example
schema be changed at all? Maybe doing nothing is fine. Other options
include removing the price field altogether, or putting in a "don't do
this yourself!" disclaimer in the XML. If Solr gets fixed precision
decimal types later on then switching to those might be the best
option.

Reply via email to