Peter , Thanks for the clarification.
Why I specifically asked was because, we have many search instances (200+) on a single JVM. Each of these instaces could have <n> users and each user can subscribe to <n> products .Now accordng to your suggestion , I need to maintain an in-memory list of all users and their subscribed products for each of the instances and use this list to fllter for a given query.We are maintaining the user and subscrption details in a DB. I was wondering ,instead if it would make more sense(with respect to memory) to dynamically get the subscribed product ids when ever a user logs in (as access is only for the user session) and use this data to flter the query ? And we really do not have budget and hence wont be able to contract LI for this ,though I will certanly need to get some JAVA experts help wthin my org. Thanks for your time Regards Sujatha On Wed, Jun 15, 2011 at 11:29 PM, Peter Sturge <peter.stu...@gmail.com>wrote: > Hi, > > By in-memory, I mean you hold a list of users (+ some other parameters > like order number, expiry, what ever else you need) in one of those > Greek HashMaps, and use this list to determine what query > parameters/results will be processed for a given search request > (SOLR-1872 reads an acl file to populate such a list). So if you had > 500 users who had purchased stuff at a given moment, you'd have 500 > entries in the table that hold the relevant data to filter/not filter > searches/results. > This won't cause a memory problem unless you have a million users and > stored their autobiography in each entry. > I wouldn't call this sort of thing a novice or even journeyman's task, > you would definitely need to know about using and maintaining tables > etc. > Would you be able to contract someone to do the work on your behalf? > There are some excellent resources around, and Lucid would certainly > do a great job, but of course you'd need budget for this approach. > Alternatively, maybe you can tap some java expertise within your > organization to help out? > > HTH, > Peter > > > On Wed, Jun 15, 2011 at 6:17 PM, Sujatha Arun <suja.a...@gmail.com> wrote: > > Thanks ,Peter. > > > > I am not a Java Programmer and hence the code seems all Greek and Latin > to > > me .I do have a basic knowledge ,but all this Map,hashMap > > ,Hashlist,NamedList , I dont understand. > > > > However I would like to implement the solution that you have mentoned > ,so > > if you have any pointers for me ,would be great .I would also try to dig > > deep into JAVA. > > > > What s meant by in-memory?Is it the Ram memory ,So If i have <n> > > concurrent users ,each having <n> products subscrbed,what would be the > > Impact on memory ? > > > > > > > > Regards > > Sujatha > > > > > > On Tue, Jun 14, 2011 at 5:43 PM, Peter Sturge <peter.stu...@gmail.com > >wrote: > > > >> SOLR-1872 doesn't add discrete booleans to the query, it does it > >> programmatically, so you shouldn't see this problem. (if you have a > >> look at the code, you'll see how it filters queries) > >> I suppose you could modify SOLR-1872 to use an in-memory, > >> dynamically-updated user list (+ associated filters) instead of using > >> the acl file. > >> This would give you the 'changing users' and 'expiry' functionailty you > >> need. > >> > >> > >> > >> On Tue, Jun 14, 2011 at 10:08 AM, Sujatha Arun <suja.a...@gmail.com> > >> wrote: > >> > Thanks Peter , for your input . > >> > > >> > I really would like a document and schema agnostic solution as in > >> solr > >> > 1872. > >> > > >> > Am I right in my assumption that SOLR1872 is same as the solution > that > >> > we currently have where we add a flter query of the products to > orignal > >> > query and hence (SOLR 1872) will also run into TOO many boolean > clause > >> > expanson error? > >> > > >> > Regards > >> > Sujatha > >> > > >> > > >> > On Tue, Jun 14, 2011 at 1:53 PM, Peter Sturge <peter.stu...@gmail.com > >> >wrote: > >> > > >> >> Hi, > >> >> > >> >> SOLR-1834 is good when the original documents' ACL is accessible. > >> >> SOLR-1872 is good where the usernames are persistent - neither of > >> >> these really fit your use case. > >> >> It sounds like you need more of an 'in-memory', transient access > >> >> control mechanism. Does the access have to exist beyond the user's > >> >> session (or the Solr vm session)? > >> >> Your best bet is probably something like a custom SearchComponent or > >> >> similar, that keeps track of user purchases, and either > adjusts/limits > >> >> the query or the results to suit. > >> >> With your own module in the query chain, you can then decide when the > >> >> 'expiry' is, and limit results accordingly. > >> >> > >> >> SearchComponent's are pretty easy to write and integrate. Have a look > >> at: > >> >> http://wiki.apache.org/solr/SearchComponent > >> >> for info on SearchComponent and its usage. > >> >> > >> >> > >> >> > >> >> > >> >> On Tue, Jun 14, 2011 at 8:18 AM, Sujatha Arun <suja.a...@gmail.com> > >> wrote: > >> >> > Hello, > >> >> > > >> >> > > >> >> > Our Use Case is as follows > >> >> > > >> >> > Several solr webapps (one JVM) ,Each webapp catering to one client > >> .Each > >> >> > client has their users who can purchase products from the site > .Once > >> >> they > >> >> > purchase ,they have full access to the products ,other wise they > can > >> only > >> >> > view details . > >> >> > > >> >> > The products are not tied to the user at the document level, > simply > >> >> because > >> >> > , once the purchase duration of product expires ,the user will no > >> longer > >> >> > have access to that product. > >> >> > > >> >> > So a search for a product once the user logs in and searches for > only > >> the > >> >> > products that he has access to Will translate to something like > this . > >> >> ,the > >> >> > product ids are obtained form the db for a particular user and can > >> run > >> >> > into n number. > >> >> > > >> >> > <search term> &fq=product_id(100 10001 ......n number) > >> >> > > >> >> > but we are currently running into too many Boolean expansion error > .We > >> >> are > >> >> > not able to tie the user also into roles as each user is mainly any > >> one > >> >> who > >> >> > comes to site and purchases a product . > >> >> > > >> >> > Given the 2 solutions above as SOLR -1872 where we have to specify > the > >> >> user > >> >> > in an ACL file and > >> >> > query for allow and deny also translates to what we are trying to > do > >> >> above > >> >> > > >> >> > In Case of SOLR 1834 ,we are required to use a crawler (APACHE > >> >> manifoldCF) > >> >> > for indexing the Permissions(also the data) into the document and > then > >> >> > querying on it ,this will also not work in our scenario as we have > n > >> web > >> >> > apps having the same requirement ,it would be tedious to set this > up > >> for > >> >> > each webapp and also the requirement that once the user permission > >> for a > >> >> > product is revoked ,then he should not be able to search on the > same > >> >> within > >> >> > his subscribed products. > >> >> > > >> >> > Any pointers would be helpful and sorry about the lengthy > description. > >> >> > > >> >> > Regards > >> >> > Sujatha > >> >> > > >> >> > >> > > >> > > >