Hoss Thanks for the reply. The posting was an excellent write-up and helped me visualize my problem domain and solution better.
I like the idea about storing filter information in the contract index indexed by company. It might work in my case. 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? Thanks Sid -----Original Message----- From: Chris Hostetter [mailto:[EMAIL PROTECTED] Sent: Sunday, October 09, 2005 9:05 PM To: java-user@lucene.apache.org Subject: Re: Is Lucene right for me? : I am evaluating Lucene for this purpose. I realize I am attempting to use : primarily a search engine as an inclusion/exclusion index solution, where : data about contracts, customers and blocking rules is in the index, and : Lucene provides the class of products available/forbidden for sale. : : Questions: : 1. Is this the right use of Lucene? I don't think it's too much of a stretch to say that Lucene can easily be used for applying inclusion/exclusion rules to generate a product catalog -- that's exactly what I do with it -- but it doesn't particularly facilitate it. If you haven't seen this post, you should start by reading it... http://www.nabble.com/Announcement%3A-Lucene-powering-CNET.com-Product-Categ ory-Listings-t266441.html#a748420 ...it strikes me as a very similar situation to what you are describing. I would suggest you store each product as a document in your index, and impliment your exclusion rules as Filters. When a user comes to your site, identify what set of exclusion rules applies to them, and generate a Filter to corrispond to those rules. Then let them search/browse as needed. how you store those exclusion rules is up to you. In my case i put them in stored fields in special metadata documes in my index, using an XML representation that i can use to easily construct filter objects. I can imagine it might make sense for you to store "contract" documents in your index, with "companyId" as an indexed field. When a user comes to your site and says they are with companyId#1234, you do one search to get all the "contracts" associated with that company, and then parse those documents to generate a list of Filters to compose together on all searches done by the user. One last comment... : b. Given these list of SKUs, tell me which ones are blocked and which : are not by looking at all the blocking rules defined at the category : or individual SKU level. : Is Lucene's Query API flexible enough to support such different queries? : Will it scale for query b, where the list of SKUs may be large (thousands)? What made it possible for me to impliment my project at all (let alone with lucene) was the ability to deal with sets of documents as BitSets. I didn't have to worry about finding the intersections of large sets of product SKUs - i just had to AND some some BitSets. In short, I don't think you'll ever find a need to query for a list of thousands of SKUs, I think you'll find it easier to query for farious rules/categories and get a BitSet which identifies all of the documents for the products those SKUs represent in your index. -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]