Skip to content

unsupported index on field names like $** and so on#173

Closed
satebam wants to merge 3 commits intoawslabs:masterfrom
satebam:master
Closed

unsupported index on field names like $** and so on#173
satebam wants to merge 3 commits intoawslabs:masterfrom
satebam:master

Conversation

@satebam
Copy link
Contributor

@satebam satebam commented Nov 6, 2025

Issue #, if available:

Description of changes:

MongoDB index on field $**:

> db.dummycol.createIndex({"$**": 1})
{
	"numIndexesBefore" : 1,
	"numIndexesAfter" : 2,
	"createdCollectionAutomatically" : true,
	"ok" : 1
}

DocumentDB index on field $**:

rs0 [direct: primary] test> db.dummycol.createIndex({"$**": 1})
MongoServerError: Index type not supported : $**

DocumentDB doesn't allow indexes on the field $, $, $*** and so on.

So, this PR is to capture this issue.

Sample output after change:

image

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Sateesh Bammidi and others added 2 commits November 5, 2025 22:41
Amazon DocumentDB doesn't allow index on field names like $**, $*** and so on.
Copy link
Contributor

@tmcallaghan tmcallaghan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting the following changes

  • avoid the unnecessary complication of regex, a simple "in" should suffice
  • rather than reporting "unsupported field names" call it out with something more precise like "wildcard indexes are not supported"

@satebam
Copy link
Contributor Author

satebam commented Nov 6, 2025

Requesting the following changes

  • avoid the unnecessary complication of regex, a simple "in" should suffice
  • rather than reporting "unsupported field names" call it out with something more precise like "wildcard indexes are not supported"

Made the fixes:

  1. Removed the regex logic
  2. Renamed unsupported field name s as UNSUPPORTED_WILDCARD_INDEXES

@tmcallaghan
Copy link
Contributor

Closing, proper fix is in #175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants