Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Java MongoDB client createIndex() is creating the index but they are not being returned as part of listIndexes()

arham .Feb 23 2024

Hi,
We have built a MongoDB based Java application. Now we are trying to support Oracle DB as well.
So we are trying to use Oracle API for MongoDB. Our Oracle DB version is 23c and ORDS version 23.4.
It was pretty straightforward to use Oracle DB in place of MongoDB with ORDS approach.
Everything seems to be working fine except indexes.

collection.createIndex(new Document("email", 1)); – It is creating the index in oracle DB. We have checked that.

collection.listIndexes() → Do not return the created index in the list.

I understand that we do not need to list the created index but there is third party library Mongock internally verify index creation by listIndexes method and that we cannot change.

Is there anything we are doing wrong because Oracle documentation says that it support index creation and listing.

Comments
Post Details
Added on Feb 23 2024
0 comments
139 views