I set “name” with “trigram” and “term”, “workspace_key” with “exact”
I hope that I can filter data from 50million nodes,however, only 1 million nodes,I can’t use search dql.
- If I use dql like ‘{
resources(func: eq(workspace_key, “_xGWV7”))@filter(regexp(name, /EOR/i)) {
id
name
resource_key
}
}’
its return is ‘{
“data”: {
“resources”: [
{
“id”: “3IawkShKWcAib”,
“name”: “EORandCPUandLow”,
“resource_key”: “scene”
},
{
“id”: “rCdURqC0RXdjF”,
“name”: “EORandCPUandHigh”,
“resource_key”: “scene”
},
{
“id”: “Sk9QT03MaVW4b”,
“name”: “EORCPU”,
“resource_key”: “scene”
},
{
“id”: “LMrPKhCkSRomv”,
“name”: “EORandCPUandHigh”,
“resource_key”: “scene”
}
]
},
“extensions”: {
“server_latency”: {
“parsing_ns”: 72705,
“processing_ns”: 10924025523,
“encoding_ns”: 103204,
“assign_timestamp_ns”: 650475,
“total_ns”: 10924935738
},
“txn”: {
“start_ts”: 47708734
},
“metrics”: {
“num_uids”: {
“_total”: 1021224,
“id”: 4,
“name”: 1021216,
“resource_key”: 4,
“workspace_key”: 0
}
}
}
}’
,the search time more than 15s, sometime it will be overtime
2.If I use dql like ‘{
resources(func: regexp(name, /EOR/i))@filter(eq(workspace_key, “_xGWV7”)) {
id
name
resource_key
}
}’,
its return is '{
“data”: {
“resources”: [
{
“id”: “3IawkShKWcAib”,
“name”: “EORandCPUandLow”,
“resource_key”: “scene”
},
{
“id”: “rCdURqC0RXdjF”,
“name”: “EORandCPUandHigh”,
“resource_key”: “scene”
},
{
“id”: “Sk9QT03MaVW4b”,
“name”: “EORCPU”,
“resource_key”: “scene”
},
{
“id”: “LMrPKhCkSRomv”,
“name”: “EORandCPUandHigh”,
“resource_key”: “scene”
}
]
},
‘{
“data”: {
“resources”: [
{
“id”: “3IawkShKWcAib”,
“name”: “EORandCPUandLow”,
“resource_key”: “scene”
},
{
“id”: “rCdURqC0RXdjF”,
“name”: “EORandCPUandHigh”,
“resource_key”: “scene”
},
{
“id”: “Sk9QT03MaVW4b”,
“name”: “EORCPU”,
“resource_key”: “scene”
},
{
“id”: “LMrPKhCkSRomv”,
“name”: “EORandCPUandHigh”,
“resource_key”: “scene”
}
]
},
“extensions”: {
“server_latency”: {
“parsing_ns”: 98835,
“processing_ns”: 65669294,
“encoding_ns”: 110217,
“assign_timestamp_ns”: 828831,
“total_ns”: 66795915
},
“txn”: {
“start_ts”: 47823833
},
“metrics”: {
“num_uids”: {
“_total”: 200,
“id”: 4,
“name”: 4,
“resource_key”: 4,
“workspace_key”: 188
}
}
}
}’
And search time is only 100ms!
So I hope that if there is any relevant solution, please reply, thank you!