UNPKG

@ocap/indexdb-elasticsearch

Version:
36 lines (29 loc) 894 B
module.exports = () => ({ mappings: { dynamic: false, properties: { pk: { type: 'text', index: false }, address: { type: 'keyword' }, moniker: { type: 'text' }, endpoint: { type: 'text' }, joinTime: { type: 'date' }, leaveTime: { type: 'date' }, genesisTime: { type: 'date' }, renaissanceTime: { type: 'date' }, totalStake: { type: 'keyword' }, availableStake: { type: 'keyword' }, totalGain: { type: 'keyword' }, proposedBlockCount: { type: 'integer' }, verifiedBlockCount: { type: 'integer' }, latestBlockHeight: { type: 'integer' }, latestBlockHash: { type: 'keyword' }, rollup: { type: 'keyword' }, }, }, settings: { index: { number_of_shards: +(process.env.ES_SHARD_COUNT || 1), number_of_replicas: +(process.env.ES_REPLICA_COUNT || 0), }, }, });