Remote OpenSearch instance fails to create indexes for Bitbucket Data Center.

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible


The OpenSearch instance, which is configured remotely, is experiencing issues with creating indexes for Bitbucket Data Center. Although the remote instance has been set up successfully and has established a connection with Bitbucket, the process of creating indexes has failed. Consequently, search functionality within Bitbucket Data Center remains unavailable.



The below error in seen Bitbucket logs:

023-02-22 15:51:36,119 ERROR [search-indexing:thread-1] c.a.b.i.s.i.e.DefaultIndexEventWorker Indexing - Failed for repository PRJ/repo (id: 285) with error: Indexing for repository with id 285 failed and should be retried Indexing for repository with id 285 failed and should be retried
Caused by: java.lang.IllegalStateException: Object content expected to have '_type' field, but was not present; present fields: _index, _id, _version, result, _shards, _seq_no, _primary_term, status
at com.atlassian.elasticsearch.client.content.ObjectContent.lambda$getOrThrow$5(


Based on the error message, it appears that OpenSearch is expecting a specific field named '_type' that is not present in the payload sent by Bitbucket. This results in the java.lang.IllegalStateException and fails the index creation. In summary, it appears that there is an incompatibility issue between the version of OpenSearch being used and Bitbucket.


We recommend double-checking the supported platforms documentation for the version of Bitbucket that you are currently using. It is essential to ensure that you are using the compatible version of OpenSearch that aligns with the Bitbucket version. If the version is not compatible, we suggest upgrading or reinstalling the appropriate version of OpenSearch on your remote instance and reconnecting it with Bitbucket.

Last modified on Aug 18, 2023

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.