Perhaps you're making this harder than it needs to be.

The preferred way of handling ACL calculations is by group. That is,
you just have a multiValued field in each document that contains the
groups have permissions for that document, say G1, G2, G3. Then you
just add an fq clause for the query that contains the groups the user
belongs to, as &fq=acl:(G1 G2 G3). this woks well when you have, say,
< 100 groups (or authorization tokens) and know them at index time.

The other thing you can consider is a PostFilter, here's the JIRA:
https://issues.apache.org/jira/browse/SOLR-2429

The third option is to use a custom Function, see
http://wiki.apache.org/solr/FunctionQuery
The trick here is that you can use the contents of fields (really, numeric
data works best) to compute a value that is multiplied into the score. If
you return 0 when the user isn't permitted access, the score becomes 0
and the document isn't returned.

the thing you have to be careful of is that accessing the contents of fields
for each document in a search can be very, very costly.

Best
Erick


On Wed, Aug 29, 2012 at 7:28 AM,  <johannes.schwendin...@blum.com> wrote:
> Von:
> Ahmet Arslan <iori...@yahoo.com>
> An:
> solr-user@lucene.apache.org
> Datum:
> 29.08.2012 10:50
> Betreff:
> Re: Antwort: Re: refiltering search results
>
>
> Thanks for the answer.
>
> My next question is how can i filter the result or how to replace the old
> ResponseBuilder Result with a new one?
>
>
> --- On Wed, 8/29/12, johannes.schwendin...@blum.com
> <johannes.schwendin...@blum.com> wrote:
>
>> From: johannes.schwendin...@blum.com <johannes.schwendin...@blum.com>
>> Subject: Antwort: Re: refiltering search results
>> To: solr-user@lucene.apache.org
>> Date: Wednesday, August 29, 2012, 8:22 AM
>> The main idea is to filter results as
>> much as possible with solr an then
>> check this result again.
>> To do this I have to read some information from some fields
>> of the
>> documents in the result.
>> At the moment I am trying to do this in the process method
>> of a Search
>> Component. But I even dont know
>> how to get access to the search results or the index Fields
>> of the
>> documents.
>> I have thought of ResponseBuilder.getResults() but after I
>> have the
>> DocListandSet Object I get stuck.
>
>
> You can read information from some fields using DocListandSet with
>
> org.apache.solr.util.SolrPluginUtils#docListToSolrDocumentList
>
> method.
>

Reply via email to