async function putBookMapping () {
const schema = {
title: { type: 'keyword' },
author: { type: 'keyword' },
location: { type: 'integer' },
text: { type: 'text' }
}

return client.indices.putMapping({ index, type, body: { properties: schema } })
}
/** Add book section schema mapping to ES */
Add book section schema mapping to ES
Add book section schema mapping to ES
async function putBookMapping () {
const schema = {
title: { type: 'keyword' },
author: { type: 'keyword' },
location: { type: 'integer' },
text: { type: 'text' }
}
return client.indices.putMapping({ index, type, body: { properties: schema } })
}
async function putBookMapping ( ) { const schema = { title : { type : 'keyword' } , author : { type : 'keyword' } , location : { type : 'integer' } , text : { type : 'text' } } return client . indices . putMapping ( { index , type , body : { properties : schema } } ) }
Add book section schema mapping to ES
Add book section schema mapping to ES