I do the project only data query, MongoDB database is other companies to store data and maintenance.
The pit daddy is the data I need is in the deep level of a record in MongoDB.
I need to take the nth value of BV in the BMV record of VL, according to the parameters.
A lot of data, if taken out, the subsequent data processing will greatly affect the efficiency.
MongoDB statement:
Find ({"BSN": "95614", "BMV. Vl. BV ": {" $exists ": true}," ct ": {" $gte ": 1419868800," $lte ": 1419955200}}, {" _id ": 0," CT ": 1," BMV. VL ": {" $slice ": [0, 1]}," BMV. Vl. BV ": {" $slice ": [4, 1]}})
Execution Result:
The following begins the explanation of the statement:
Find (query criteria, what to display);
"BMV. Vl. BV ": {" $exists ": True},//BMV below the VL field in the below is present, note: Just this field exists and is not guaranteed not to be empty oh;
"CT": {"$gte": 1419868800, "$lte": 1419955200}//$gte: Less than or equal, $GT: Less Than, $lt: greater Than, $lte: greater than or equal to;
"BMV. VL ": {" $slice ": [0, 1]}//displays the first record in the VL array below BMV;
"BMV. Vl. BV ": {" $slice ": [4, 1]}//Displays the 5th digit in the BV array;
feilds:{"$slice": [M, n]}//displays only n data in the Feilds array starting with M (excluding m).
MongoDB Deep Query