Legacy Knowledge Base
Published Jun. 30, 2025

Failed to create query: [nested] nested object under path [ddmFieldArray] is not of nested type

Written By

Apsara Raheja

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • When Liferay starts up and the user tries to fetch the home page where images are uploaded, the below errors are shown in the Liferay logs:
    {"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed to create query: [nested] nested object under path [ddmFieldArray] is not of nested type","index_uuid":"xmym0ZbiQ4al2XNOAVKnUw","index":"liferay-20115"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"liferay-20115","node":"WdAACjoRSZ-mx6U_5gYPuQ","reason":{"type":"query_shard_exception","reason":"failed to create query: [nested] nested object under path [ddmFieldArray] is not of nested type","index_uuid":"xmym0ZbiQ4al2XNOAVKnUw","index":"liferay-20115","caused_by":{"type":"illegal_state_exception","reason":"[nested] nested object under path [ddmFieldArray] is not of nested type"}}}]},"status":400}

Environment

  • Liferay Quarterly Release

Resolution

  • Navigate to System Settings  Dynamic Data Mapping  Dynamic Data Mapping Indexer, select Enable Legacy Dynamic Data Mapping IndexFields and execute a full reindex.
  • Possible root cause: The dynamic data mapping fields in Elasticsearch that start with ddm__keyword__ and ddm__text__ have been moved to a new nested document ddmFieldArrayin DXP 7.3. This issue might be caused by anyone with custom developments that execute queries in the Elasticsearch index using ddm__keyword__* and ddm__text__* fields.
  • Hence, to avoid this, the user needs to use a new nested document ddmFieldArray in their Elasticsearch queries.
  • Here are some examples in the Liferay code. For example, DDMIndexerImpl and AssetHelperImpl use the DDM_FIELD_ARRAY constant. 

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base