config variable to index all tags

This commit is contained in:
Anton Kaliaev
2017-11-30 20:02:39 -06:00
parent 03222d834b
commit e538e0e077
4 changed files with 46 additions and 15 deletions

View File

@@ -288,7 +288,13 @@ func NewNode(config *cfg.Config,
if err != nil {
return nil, err
}
txIndexer = kv.NewTxIndex(store, strings.Split(config.TxIndex.IndexTags, ","))
if config.TxIndex.IndexTags != "" {
txIndexer = kv.NewTxIndex(store, kv.IndexTags(strings.Split(config.TxIndex.IndexTags, ",")))
} else if config.TxIndex.IndexAllTags {
txIndexer = kv.NewTxIndex(store, kv.IndexAllTags())
} else {
txIndexer = kv.NewTxIndex(store)
}
default:
txIndexer = &null.TxIndex{}
}