diff --git a/src/initDbs.ts b/src/initDbs.ts index 878ef7a..2ab009c 100644 --- a/src/initDbs.ts +++ b/src/initDbs.ts @@ -19,6 +19,11 @@ const transactionIndexFields: string[][] = [ ['timestamp'] ] +const transactionIndexFieldsNoPartition: string[][] = [ + ['depositAddress'], + ['payoutAddress'] +] + interface Index { index: { fields: string[] } ddoc: string @@ -46,6 +51,18 @@ transactionIndexFields.forEach(index => { transactionIndexes.push(out2) }) +transactionIndexFieldsNoPartition.forEach(index => { + const indexLower = index.map(i => i.toLowerCase()) + const out: Index = { + index: { fields: index }, + ddoc: indexLower.join('-'), + name: indexLower.join('-'), + type: 'json', + partitioned: false + } + transactionIndexes.push(out) +}) + const cacheIndexes: Index[] = [ { index: { fields: ['timestamp'] },