First of all, from what I can see, this won't do what you're expecting. Multiple fq conditions are always combined using AND, so if a user is member of 100 groups, but the document is accessible to only 99 of them, then the user won't find it.

Or in other words, if you add a user to some group, then she would get *less* results than before.

But coming back to your performance question: Just try it. Having 100 fq conditions will of course slow down your query a bit, but not that much. I rather see the problem with the filter cache: It will only be fast enough if all of your fq filters fit into the cache. Each possible fq filter will take 1 million/8 == 125k bytes, so having hundreds of possible access groups conditions might blow up your query cache (which must fit into RAM).

-Michael


Am 16.03.2017 um 13:02 schrieb Ganesh M:
Hi,

We have 1 million of documents and would like to query with multiple fq values.

We have kept the access_control ( multi value field ) which holds information 
about for which group that document is accessible.

Now to get the list of all the documents of an user, we would like to pass 
multiple fq values ( one for each group user belongs to )

q:somefiled:value&
fq:access_control:g1&fq:access_control:g2&fq:access_control:g3&fq:access_control:g4&fq:access_control:g5...

Like this, there could be 100 groups for an user.

If we fire query with 100 values in the fq, whats the penalty on the 
performance ? Can we get the result in less than one second for 1 million of 
documents.

Let us know your valuable inputs on this.

Regards,


Reply via email to