: I was just reading about the limit on boolean operators in a query (it : seems to default to 1024 in Solr). : : Using option 2 would mean that a user can't be in any more than 1024 : communities (assuming no other boolean logic in the query).
that limit applies to boolean query clauses which are used in scoring, and can be changed in the solrconfig (see <maxBooleanClauses>, it's really justa lucene settting that helps to save you from yourself) ... but for things like access control you don't care about scoring -- just set membership, so you can use use and combine Filters which can be cached independently. Reading up on Lucene Filters is definitely the next best step to get a sense of how you can achieve your goal -- just don't get confused beween Filters used in searching and "TokenFilters" used when analyzing text -- they have regretably similar names. searching the general Lucene user groups for "access control", "permissions" and "security" should turn up quite a few suggestions on how to approach this problem with Lucene indexes in general, all of which can be done in Solr as well -- many of which can be done efficiently much easier in Solr becuase Solr takes care of the Query->Filter conversions for you on the fly when you don't care about scoring, and because Solr manages (and can autowarm when changes occur) your caches for you. -Hoss