Don't use mixed case, refs #6308
Add raw version of refCode in the index, refs #6308

Store a not analyzed version of the inherit_reference_code field for
better sorting. Also, the sorting option was pointing to reference_code
instead of inherit_reference_code causing an error.