Interact with your Elasticsearch data
Creating the Smart Collection
const { collection } = require('forest-express-sequelize');
collection('bank-accounts', {
isSearchable: false,
fields: [
{
field: 'id',
type: 'string',
}, {
field: 'account_number',
type: 'Number',
isFilterable: true,
}, {
field: 'address',
type: 'String',
isFilterable: true,
}, {
field: 'firstname',
type: 'String',
isFilterable: true,
}, {
field: 'lastname',
type: 'String',
isFilterable: true,
}, {
field: 'age',
type: 'Number',
isFilterable: true,
}, {
field: 'balance',
type: 'Number',
isFilterable: true,
}, {
field: 'city',
type: 'String',
isFilterable: true,
}, {
field: 'employer',
type: 'String',
isFilterable: true,
}, {
field: 'email',
type: 'String',
isFilterable: true,
}, {
field: 'gender',
type: 'Enum',
isFilterable: true,
enums: [
'M',
'F',
],
}, {
field: 'state',
type: 'String',
isFilterable: true,
}],
});
Implementing the routes
Implementing the GET (all records)


Implementing the GET (a specific record)
Implementing the PUT
Implementing the DELETE
Delete a list a single record
Delete a list of records
Implementing the POST
Last updated