Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Commit 2548211

Browse files
committed
Update elastic.js
1 parent 69b1b12 commit 2548211

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/lib/elastic.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ function loadSchema (entityType) {
197197
}
198198

199199
// this is deprecated just for ES 5.6
200-
function putMappings(db, indexName, next) {
200+
function putMappings (db, indexName, next) {
201201
let productSchema = loadSchema('product');
202202
let categorySchema = loadSchema('category');
203203
let taxruleSchema = loadSchema('taxrule');
@@ -207,39 +207,39 @@ function putMappings(db, indexName, next) {
207207

208208
db.indices.putMapping({
209209
index: indexName,
210-
type: "product",
210+
type: 'product',
211211
body: productSchema
212212
}).then(res1 => {
213213
console.dir(res1, { depth: null, colors: true })
214214

215215
db.indices.putMapping({
216216
index: indexName,
217-
type: "taxrule",
217+
type: 'taxrule',
218218
body: taxruleSchema
219219
}).then(res2 => {
220220
console.dir(res2, { depth: null, colors: true })
221221

222222
db.indices.putMapping({
223223
index: indexName,
224-
type: "attribute",
224+
type: 'attribute',
225225
body: attributeSchema
226226
}).then(res3 => {
227227
console.dir(res3, { depth: null, colors: true })
228228
db.indices.putMapping({
229229
index: indexName,
230-
type: "cms_page",
230+
type: 'cms_page',
231231
body: pageSchema
232232
}).then(res4 => {
233-
console.dir(res4, { depth: null, colors: true })
233+
console.dir(res4, { depth: null, colors: true })
234234
db.indices.putMapping({
235235
index: indexName,
236-
type: "cms_block",
236+
type: 'cms_block',
237237
body: blockSchema
238238
}).then(res5 => {
239-
console.dir(res5, { depth: null, colors: true })
239+
console.dir(res5, { depth: null, colors: true })
240240
db.indices.putMapping({
241241
index: indexName,
242-
type: "category",
242+
type: 'category',
243243
body: categorySchema
244244
}).then(res6 => {
245245
console.dir(res6, { depth: null, colors: true })
@@ -259,8 +259,6 @@ function putMappings(db, indexName, next) {
259259
})
260260
}
261261

262-
263-
264262
module.exports = {
265263
putAlias,
266264
createIndex,

0 commit comments

Comments
 (0)