-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathseed.js
More file actions
32 lines (23 loc) · 707 Bytes
/
Copy pathseed.js
File metadata and controls
32 lines (23 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*jslint node:true*/
/*globals DB*/
'use strict';
var boot = require('./bootstrap/');
boot.mongo();
function start() {
var indexSearchJobs = {
"compName": "text",
"jobTitle": "text",
"jobType": "text",
"jobLocation": "text",
"jobDesc": "text"
};
DB.collection('jobs').ensureIndex(indexSearchJobs, {"name": "SearchIndex"}, function (err, result) {
console.log("Index to full search: ", err || result);
});
DB.collection('jobs').ensureIndex({"expireDate": 1}, {"expireAfterSeconds": 0}, function (err, result) {
console.log("Index to expire date: ", err || result);
});
}
setTimeout(function () {
start();
}, 1000);