-
I am starting to look at building an index as described here: https://openfga.dev/docs/interacting/search-with-permissions Would not this index get huge easily though? Say for example we have So, if |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@velmohan you are correct. However, your described approach assumes that you index a single row per combination (x, y, z). This is an approach, but depending on the kinds of resource ids in the system you may be able to optimize using bitmaps. An alternative could be to store a single bitmap index per user. Since an index is typically serving queries for the end user (e.g. show me all of the objects that a specific user has access to), then it makes sense to index a bitmap representing the effective access a user has for a particular relationship. For example, let's assume we have a
then a bitmap index would look like the following:
The |
Beta Was this translation helpful? Give feedback.
@velmohan you are correct. However, your described approach assumes that you index a single row per combination (x, y, z). This is an approach, but depending on the kinds of resource ids in the system you may be able to optimize using bitmaps. An alternative could be to store a single bitmap index per user. Since an index is typically serving queries for the end user (e.g. show me all of the objects that a specific user has access to), then it makes sense to index a bitmap representing the effective access a user has for a particular relationship.
For example, let's assume we have a
len(objects)=3
,len(users) =2
,len(relations)=2
, then the index would be of sizelen(users) * len(relations…