Open MihirSavjani opened 2 months ago
Hii, I'm trying to implement the [[relate]] feature in my project, but I'm not getting the expected output.
[[relate]]
Here's the setup:
Database: test with two collections:
{ "_id": "12345", "name": "demo" }
{ "_id": "456", "userId": "12345", "productName": "laptop" }
I want to include the name from the users collection in the orders records, based on the userId. Here's the configuration in my Monstache config file:
name
users
orders
userId
mongo-url = "mongodb://127.0.0.1:27018/test" elasticsearch-urls = ["http://localhost:9300"] change-stream-namespaces = ["test.users","test.orders"] direct-read-namespaces = ["test.users","test.orders"] enable-http-server = true verbose = true [[relate]] namespace = "test.orders" with-namespace = "test.users" src-field = "userId" match-field = "_id" keep-src = true dot-notation = true
I'm using Monstache version 6.7.17 and Elasticsearch version 7.10.0.
After syncing, this is the data I receive in Elasticsearch:
{ "productName": "laptop", "userId": "12345" }
It seems like the userName is not being added. Could you please help me figure out what might be going wrong?
userName
Thank you in advance!
Hii, I'm trying to implement the
[[relate]]
feature in my project, but I'm not getting the expected output.Here's the setup:
Database: test with two collections:
I want to include the
name
from theusers
collection in theorders
records, based on theuserId
. Here's the configuration in my Monstache config file:I'm using Monstache version 6.7.17 and Elasticsearch version 7.10.0.
After syncing, this is the data I receive in Elasticsearch:
It seems like the
userName
is not being added. Could you please help me figure out what might be going wrong?Thank you in advance!