Adds a sortable field to documents