Use: add field {$ set: {field: 1} In MongoDB in C ++) delete field {$ unset: {field: 1}) query element {Keyword: {$ all: [location, Other
Use: add field {$ set: {field: 1} In MongoDB in C ++) delete field {$ unset: {field: 1}) query element {Keyword: {$ all: [location, Other
Use MongoDB in C ++:
Add Field
{$ Set: {"field": 1 }})
Delete Field
{$ Unset: {"field": 1 }})
Query elements in an array
{"Keyword": {$ all: ["location", "other"]}
Add array elements (repeated elements are not added)
{"$ AddToSet": {"keyword": {"$ each": ["location", "other"]}
Query by longitude and latitude (longitude at the beginning and latitude at the end)
Sort from near to far
{"Latitude and longitude": {"$ near": [28.0988562, 109.3167951]}
Take coordinates as the center (longitude, latitude, distance)
{"Address information. Latitude and longitude": {"$ within": {"$ center": [28.0988562, 109.3167951], 0.1]}
,