UNPKG

@ocap/indexdb-elasticsearch

Version:
35 lines (34 loc) 996 B
module.exports = () => ({ mappings: { dynamic: false, properties: { address: { type: 'keyword' }, pk: { type: 'text', index: false }, balance: { type: 'keyword' }, issuer: { type: 'keyword' }, migratedFrom: { type: 'keyword' }, migratedTo: { type: 'keyword' }, moniker: { type: 'text' }, nonce: { type: 'text', index: false }, numAssets: { type: 'long', index: false }, numTxs: { type: 'long', index: false }, genesisTime: { type: 'date' }, renaissanceTime: { type: 'date' }, data: { type: 'object', enabled: false }, stake: { type: 'object', enabled: false }, tokens: { type: 'nested', properties: { address: { type: 'keyword' }, balance: { type: 'keyword' }, }, }, }, }, settings: { index: { number_of_shards: +(process.env.ES_SHARD_COUNT || 1), number_of_replicas: +(process.env.ES_REPLICA_COUNT || 0), }, }, });