mongodb - Locking Documents whose Geospatial Index is Located within a Bounding Box? -


i have collection of documents:

{    location: {     lon: 3.14,     lat: 2.72   },   value: 0.71 } 

a geospatial index defined on content of location-key.

is possible lock bounding box regarding geospatial index?

that means no documents in bbox may added, removed or changed?

does mongodb provide means requirement?

no. there's no mechanism locking documents. have implement lock @ application level, adding locked : true field documents in bounding box , requiring locked : false in updates/removes , checking inserts don't fall within box. aware mongodb doesn't have transactions, if perform multi : true update concurrently other operations, documents seen unlocked part of update have yet affected update.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -