You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Concrete example:
Given a list of 1000s of document entities ids retrieved from a search in ES we want to check if a user has access to each of them and filter them.
The current options are either:
Running 1000s of independent queries
Build a query with 1000s of independent OR statements
Both are inefficient
Current Workaround
Running 1000s of independent queries
Build a query with 1000s of independent OR statements
Proposed Solution
Add "in" (or "isIn") construct to the syntax
For example (in python):
query = "match $d isa document, has objID in ["123", "1122", "333AAA", "6A5B"]; ..."
Additional Information
Beyond improving the ease of usage, I (@maydanw) believe this can be optimized due to:
Server caching - from my understanding lots of the reasoner caching is only inside the tx,
Same server snapshot
It can have better server CPUs utilization
Less network communication
Validating the predicate value in the list can be hashed instead of searched for each.
The text was updated successfully, but these errors were encountered:
alexjpwalker
changed the title
Adding "in" to the TypeDB syntax
Adding "in" (with list of arguments) to the TypeDB syntax
Jun 8, 2021
alexjpwalker
changed the title
Adding "in" (with list of arguments) to the TypeDB syntax
Adding "in" (with a list of arguments) to the TypeDB syntax
Jun 8, 2021
flyingsilverfin
changed the title
Adding "in" (with a list of arguments) to the TypeDB syntax
Introduce in predicate to check against a set of values
Jan 10, 2023
Problem to Solve
Concrete example:
Given a list of 1000s of document entities ids retrieved from a search in ES we want to check if a user has access to each of them and filter them.
The current options are either:
Both are inefficient
Current Workaround
Proposed Solution
Add "in" (or "isIn") construct to the syntax
For example (in python):
Additional Information
Beyond improving the ease of usage, I (@maydanw) believe this can be optimized due to:
The text was updated successfully, but these errors were encountered: