It might be helpful to refine your question. Which democracy Index do you refer to?
Most of the indices do have codebooks and offer explanation on how their scores are compiled. E.g. in the the Polity Poject Freedom of Expression might be taken into account in the PARCOMP Variable as one of the measures of democracy: http://www.systemicpeace.org/inscrdata.html
In the Freedom House Index, Freedom of Expression is in Variable D4 which makes up to 4 out of 60 Points for Civil Liberties
It is Question 46 (in the section on Civil liberties) out of overall 60 Questions that asks for Freedom of expression. You find more information on the calculation here: https://www.economist.com/media/pdf/DEMOCRACY_INDEX_2007_v3.pdf