datafolder 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -103,6 +103,15 @@ dataFolder.batch
|
|
|
103
103
|
### 3. Powerful Query Support. Auto Create Needed Indexes
|
|
104
104
|
|
|
105
105
|
```javascript
|
|
106
|
+
// get all the training data in year 2026 with feedbackScore between 60 and 85.
|
|
107
|
+
dataFolder.queryFiles("traindata/2026/**", { feedbackScore: (x) => x >= 60 && x <= 85 });
|
|
108
|
+
|
|
109
|
+
// get training data of user_001 from July to Oct in year 2025, 2026 with feedbackScore higher than 90.
|
|
110
|
+
dataFolder.queryFiles(["traindata", { $in: [2025, 2026] }, { $gt: 6, $lte: 10 }], {
|
|
111
|
+
feedbackScore: { $gt: 90 },
|
|
112
|
+
userId: "user_0001",
|
|
113
|
+
});
|
|
114
|
+
|
|
106
115
|
dataFolder.queryFiles("flights/**", { _from: "airports/LAX" });
|
|
107
116
|
dataFolder.queryFiles(["flights", "*", "jan", (x) => x >= 5 && x <= 7], {
|
|
108
117
|
$or: [{ _from: "airports/BIS" }, { _to: "airports/BIS" }],
|