Re: Custom filter for document permissions

2013-02-28 Thread Erick Erickson
You might get some mileage out of encoding what you can in the documents and doing a standard fq clause on that part, and then have your post-filter do the really wild stuff. But you're right, you have to be prepared for the nightmare scenario of your sysadmin who has rights to see everything firin

Re: Custom filter for document permissions

2013-02-28 Thread Chris Hostetter
: Actually, after thinking for a bit, it makes sense to apply the post : filter everywhere, otherwise I wouldn't be able to know the number of : results overall (something I unfortunately really need). Not to mention things like facet counts, which need access to the full set of matching documen

Re: Custom filter for document permissions

2013-02-28 Thread Colin Hebert
Actually, after thinking for a bit, it makes sense to apply the post filter everywhere, otherwise I wouldn't be able to know the number of results overall (something I unfortunately really need). Anyways, thank you Timothy Colin Hebert On 28 February 2013 17:38, Colin Hebert wrote: > I know tha

Re: Custom filter for document permissions

2013-02-28 Thread Colin Hebert
I know that the query selects everything, this is why I made this request to test my solution. If a user make a query with a very large amount of results with paging, I expected the post filter to be executed only when necessary (as it can be expensive). Colin On 28 February 2013 17:25, Timothy

Re: Custom filter for document permissions

2013-02-28 Thread Timothy Potter
Hi Colin, Your query is *:* so that is every document. Try a query that only matches a small subset and see if you get different results. Cheers, Tim On Thu, Feb 28, 2013 at 8:17 AM, Colin Hebert wrote: > Thank you Timothy, > > With the indication you gave me (and the help of this article > htt

Re: Custom filter for document permissions

2013-02-28 Thread Colin Hebert
Thank you Timothy, With the indication you gave me (and the help of this article http://searchhub.org/2012/02/22/custom-security-filtering-in-solr/ ) I managed to draft my own filter, but it seems that it doesn't work quite as I expected. Here is what I've done so far: https://github.com/ColinHeb

Re: Custom filter for document permissions

2013-02-26 Thread Timothy Potter
Hi Colin, I think a filter is definitely the way to go. Moreover, you should look into Solr's PostFilter concept which is intended to work with "expensive" filters. Have a look at Yonik's blog post on this topic: http://yonik.com/posts/advanced-filter-caching-in-solr/ Cheers, Tim On Tue, Feb 26,