An error when updating indexes

tomer shmaya shared this problem 4 years ago
Solved

When choosing to update index via the right click on a collection, the automatic script created when partialFilterExpression is involves drops the $exists condition. For instance, I have this index:

{

uuid: 1,

"public.offerNumber": 1

},

{

name: "uuid_1_public.offerNumber_1",

partialFilterExpression: {

"public.offerNumber": {

"$exists": true

}

}

}


but the autoscript I mentioned looks like that:

db.StatesHistory.dropIndex("uuid_1_public.offerNumber_1");


db.StatesHistory.createIndex(

{

uuid: 1,

"public.offerNumber": 1

},

{

name: "uuid_1_public.offerNumber_1",

partialFilterExpression: {

"public.offerNumber": {

: true

}

}

}

)


as you can see the "$exsits" key is missing, and an error is indicated.

Replies (2)

photo
1

Thank you for your bug report.

We have worked out a new test build to resolve this issue, please download and give it a try.

Windows: https://nosqlbooster.com/s3/download/releasesv5/nosqlbooster4mongo-5.1.11-beta.1.exe

photo
1

Resolved in 5.1.11

Leave a Comment
 
Attach a file