I can't seem to find any guidance (official or otherwise) on when to use the Number field type vs the Integer field type.
What are the main differences that I should be considerate of?
Sitecore Stack Exchange is a question and answer site for developers and end users of the Sitecore CMS and multichannel marketing software. It only takes a minute to sign up.Sign up to join this community
The main difference is, one stores an Integer and one stores any number, e.g.
There are a couple of caveats.
The decimal separator is different between countries. And Sitecore's default input validation will be based on the current locale of the Content Editor user. Which is fine if they all run Sitecore in "en", but more of a challenge if some run the editor in "da" for instance.
12.50 would be written as
Storage wise, everything is still a string - so the above is something you need to be aware of.
Also be aware that the default indexing (at least at some point) for the
Number field ended up in an integer via Sitecore ContentSearch. This may have been updated later, I don't know.