ElasticsearchStatusException: Action/metadata line [1] contains an unknown parameter [_type]
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
learn-legacy-article-disclaimer-text
Issue
- When upgrading our Cloud Stack, we have found a problem with the Search Service. The following error is shown in the logs:
Caused by: java.lang.RuntimeException: ElasticsearchStatusException[Elasticsearch exception [type=illegal_argument_exception, reason=Action/metadata line [1] contains an unknown parameter [_type]]]
at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.document.BulkDocumentRequestExecutorImpl._getBulkResponse(BulkDocumentRequestExecutorImpl.java:198) ~[?:?]
at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.document.BulkDocumentRequestExecutorImpl.execute(BulkDocumentRequestExecutorImpl.java:68) ~[?:?]
at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.document.ElasticsearchDocumentRequestExecutor.executeBulkDocumentRequest(ElasticsearchDocumentRequestExecutor.java:50) ~[?:?]
at com.liferay.portal.search.engine.adapter.document.BulkDocumentRequest.accept(BulkDocumentRequest.java:33)
...
Environment
- Liferay PaaS
- Elasticsearch 8.0.0+
Resolution
- This happens because Elasticsearch 8.0.0 no longer supports mapping types (see here).
- This usually happens when an incompatible Elasticsearch version is used. In order to fix that mismatch, check the Search Engine Compatibility Matrix.
did-this-article-resolve-your-issue