-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.js
More file actions
22 lines (20 loc) · 720 Bytes
/
Copy pathsetup.js
File metadata and controls
22 lines (20 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const elasticsearch = require('./data/elasticsearch/index')
const authorMapping = require('./mappings/author.json')
const articleMapping = require('./mappings/article.json')
//Creating Types
elasticsearch.createType('author', authorMapping, (err, resp, respCode) => {
if (err) {
log.elasticsearch.error(err)
} else {
log.elasticsearch.debug(resp)
log.elasticsearch.debug(respCode)
elasticsearch.createType('article', articleMapping, (err, resp, respCode) => {
if (err) {
log.elasticsearch.error(err)
} else {
log.elasticsearch.debug(resp)
log.elasticsearch.debug(respCode)
}
})
}
})