hello,
I’m new to dgraph and I have some problems with query
This is my model
type <AppNode> {
app_name
app_host
}
type <UrlNode>{
url_name
visit_time
es_id
visit_user_name
belong
}
type <UserNode> {
user_name
}
# Define Directives and index
app_name: string @index(term) .
app_host: string @index(term) .
url_name: string @index(term) .
visit_time: string @index(term) .
es_id: string @index(term) .
user_name: string @index(term) .
visit_user_name: [uid] @reverse .
belong: [uid] @reverse .
{
"set": [
{
"uid": "_:t1",
"app_name":"t1",
"app_host":"t1.com"
},
{
"uid": "_:t2",
"app_name":"t2",
"app_host":"t2.com"
},
{
"url_name":"/t1/login",
"visit_time":"2023-02-01",
"es_id":"121212",
"visit_user_name":{"uid":"_:t.t"},
"belong": {"uid":"_:t1"}
},
{
"url_name":"/t2/admin",
"visit_time":"2023-06-01",
"es_id":"777",
"visit_user_name":{"uid":"_:t.t"},
"belong": {"uid":"_:t2"}
},
{
"url_name":"/t1/upload",
"visit_time":"2023-08-02",
"es_id":"999",
"visit_user_name":{"uid":"_:t.t"},
"belong": {"uid":"_:t1"}
},
{
"uid":"_:t.t",
"user_name":"t.t"
}
]
}
Now I want to search :
user_name = "t.t" and visit_time = "2023-06-01"
all of the UrlNode and AppNode