Access Nested Fields From A Search Result

This is a commonly asked question, because the standard 'dot' syntax which most platforms that support nested fields use does not work in a JSP. For example:

If a field exists in specialism.title, then the syntax ${result.fields.specialism.title} won’t work because the dot operator has a special meaning in JSP EL: it searches for a property on an object or a method.

The correct syntax is: ${result.fields['specialism.title']}. This ensures that the correct field name of the nested field, specialism.title, is used to access the field.