syncIndexes and diffIndexes does not correctly find compound indexes involving text and non-text indexe #13136
Closed
2 tasks done
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Prerequisites
Mongoose version
5.x
Node.js version
14.x
MongoDB server version
4.x
Typescript version (if applicable)
No response
Description
Given a schema with the following:
Calling
syncIndexes
on that schema ALWAYS attempts to delete and create it.Calling
diffIndexes
on that schema, even after it's been synced, always returns the compound index as both atoDrop
entry and atoCreate
entrySteps to Reproduce
Run the following tests in
test/model.indexes.test.js
Expected Behavior
The above tests to pass.
Calling
diffIndexes
on a schema that's been synced, where that schema contains a compound index involving both text and non-text indexes, should not return any diff at all.The text was updated successfully, but these errors were encountered: