monstache
monstache copied to clipboard
Mongodb views not creating elasticsearch index
Trying to create mongodb views out of few collections and modified monstache.config.toml to add these views in mapping and trying to create elasticsearch indexes , however the sync not happening for this view, the es index getting created for the original collection but not the view. Can you please help me in this regard, initially I tried to create sample view and added to index and it worked but now it is not creating not sure whats the issue?
INFO 2022/08/04 17:21:01 Started monstache version 6.7.10 c-monstache | INFO 2022/08/04 17:21:01 Go version go1.17.4 c-monstache | INFO 2022/08/04 17:21:01 MongoDB go driver v1.9.1 c-monstache | INFO 2022/08/04 17:21:01 Elasticsearch go driver 7.0.31 c-monstache | INFO 2022/08/04 17:21:01 Successfully connected to MongoDB version 4.1.9 c-monstache | INFO 2022/08/04 17:21:02 Successfully connected to Elasticsearch version 7.0.0 c-monstache | INFO 2022/08/04 17:21:02 Sending systemd READY=1 c-monstache | WARN 2022/08/04 17:21:02 Systemd notification not supported (i.e. NOTIFY_SOCKET is unset) c-monstache | INFO 2022/08/04 17:21:02 Starting http server at :8080 c-monstache | INFO 2022/08/04 17:21:02 Listening for events c-monstache | INFO 2022/08/04 17:21:02 Resuming from timestamp {T:1659633655 I:5} c-monstache | INFO 2022/08/04 17:21:02 Direct reads completed c-monstache | TRACE 2022/08/04 17:22:33 POST /_bulk HTTP/1.1
my toml looks like below:
direct-read-namespaces = ["test.view"]
change-stream-namespaces = ["test.a_table", "test.b_table"]
index-as-update = true
exit-after-direct-reads = false
[[mapping]] namespace = "test.a_table" index = "testindex"
[[mapping]] namespace = "test.view" index = "testindex"
[[relate]]
namespace = "test.a_table"
with-namespace = "test.view"
keep-src = true
[[relate]] namespace = "test.b_table" with-namespace = "test.a_table" src-field = "acct_id" match-field = "acct_id" keep-src = true