: I am not sure if I understand the BitSet solution though. Can you give me : implementation specifics around that? : Are you suggesting storing BitSet information in the document of each : cat/subcat and that the boolean value of each bit will correspond to whether : the product is blocked or not? In other words, each bit will correspond to : one product within that cat/subcat?
I'm suggesting that once you've identified the set of filters associated with each contract, you use those filters to generate (and cache) a BitSet that represents every product in your entire catalog that people from that company are eligible to see -- one bit == one document. The Filter class facilitates this very easily, and even abstracts it away so you never really need to look at hte BitSets unless you really want to. Imagine that you can represent all of your contractual rules as a list of queries, such that users of a company are only allowed to see products that match one "allow" clauses in the contract, provided they don't match any of the "disallow" clauses. Where clauses might be common among many contracts. now imagine that these clauses can be represented as simple Lucene QueryParser parsable strings... category:desks price:[0000.00 TO 1000.00] ship_allowed_states:CA mfgr:Avery +mfgr:Canon +(category:printer category:toner) sku:456-upt-90 ...A filter can be made for each of those clauses useing a QueryFilter, and those filters can be cached using a CachingWrapperFilter, and each of those cached filters can be composed into a single Filter for each contract using ChainedFilter(s) (see the sandbox/contrib area) ... giving you a single Filter object to use when anyone from any company wants to search/browse your catalog. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]