You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Vasu Y <vy...@gmail.com> on 2016/07/12 12:06:13 UTC

Custom Post Filter length & performance

Hi,
 I am implementing a custom post filter for permission checks along the
lines described by Erik at
https://lucidworks.com/blog/2012/02/22/custom-security-filtering-in-solr/

Is there a limit to the length (number of characters) of the custom post
filter? In our case, length of this "fq" could be up to a maximum of 15000
characters.
Also, if the post filter is not accessing any external system (no DB access
and no REST/Web-service calls) and just only doing a look-up of about 4
field values (for each document) against the passed "fq" values (stored in
couple of HashSets), would the performance degrade significantly (I do
understand there will be some cost) when compared to not applying the
security filter.

Thanks,
Vasu

Re: Custom Post Filter length & performance

Posted by Joel Bernstein <jo...@gmail.com>.
You should be able to send a POST to Solr that would work with larger
requests.

Postfilter performance is driven by three things:

1) How much overhead is involved in the handling of fq parameter, turning
into data structures etc...
2) How many documents the post filter needs to look at.
3) How fast is the filter for each document.

If you have large result sets, you'll need to optimized #3.


Joel Bernstein
http://joelsolr.blogspot.com/

On Tue, Jul 12, 2016 at 8:06 AM, Vasu Y <vy...@gmail.com> wrote:

> Hi,
>  I am implementing a custom post filter for permission checks along the
> lines described by Erik at
> https://lucidworks.com/blog/2012/02/22/custom-security-filtering-in-solr/
>
> Is there a limit to the length (number of characters) of the custom post
> filter? In our case, length of this "fq" could be up to a maximum of 15000
> characters.
> Also, if the post filter is not accessing any external system (no DB access
> and no REST/Web-service calls) and just only doing a look-up of about 4
> field values (for each document) against the passed "fq" values (stored in
> couple of HashSets), would the performance degrade significantly (I do
> understand there will be some cost) when compared to not applying the
> security filter.
>
> Thanks,
> Vasu
>