hi there. i have a schema like this. nodes are linked one to another, each link belongs to customer, but when browsing, one customer can have access to other customer links:
_:A <link_customer1> _:B .
_:A <link_customer2> _:B .
_:A <link_customer1> _:C .
_:A <link_customer3> _: D .
for example, i need to count for A node all distinct outcoming nodes with link_customer1 link and link_customer2 predicates only. so, result should be 2 (B and C).
it works with storing all predicates in one and adding a “customers” facet, so query would be like:
nodes_count as count(link @facets(anyofterms(customers, “customer1 customer2”))
but as i understand this solution is quite bad for sharding due to using one predicate for all customers.