Mongo index problem geo

  mongodb, question
Failed: psg.cabinet: error creating indexes for psg.cabinet: createIndex error: exception: unsupported geo index version { 2dsphereIndexVersion : 2dsph  ereIndexVersion: 3 }, only support versions: [1,2]

This is the error reported by mongo data on my synchronization line, 3.2.4 used on the line. I observed and found that the index of this set is

{
 "v" : 1,
 "key" : {
 "location.loc" : "2dsphere"
 },
 "name" : "location.loc_2dsphere",
 "ns" : "psg.cabinet",
 "2dsphereIndexVersion" : 3
 }

Then I reported the above error when I synchronized to the local. My Mongo version is 3.2.0, but after adding indexes, it is

{

"v" : 1,
 "key" : {
 "location.loc" : "2dsphere"
 },
 "name" : "location.loc_2dsphere",
 "ns" : "psg.cabinet",
 "2dsphereIndexVersion" : 2
 }

Can you tell me how to change the 2dsphereIndexVersion here to 3?

{2dsphereIndexVersion: 3}It is a new version supported by MongoDB 3.2. 3.2 is created by default with this version.2dsphereIndex. If you are not using this version when creating the index, it only means that you are not using version 3.2. Please check this first.
In addition, in principle, the new version of the database should not be restored to the old version (although it may not cause problems), so your local mongodb version should be at least newer than the online version.
If you are interested in the difference between version 3 and version 2, please read this article.blog.